Skip to content

Instantly share code, notes, and snippets.

@foxtran
Created January 16, 2023 10:51
Show Gist options
  • Save foxtran/df2508b670c85ab86cf9547260257712 to your computer and use it in GitHub Desktop.
Save foxtran/df2508b670c85ab86cf9547260257712 to your computer and use it in GitHub Desktop.

Benchmark was compiled using the following compiler:

GCC version 12.2.0

Benchmark was compiled with the following options:

-mabi=lp64d -mcpu=sifive-u74 -misa-spec=20191213 -march=rv64imafdc_zicsr -O3 -ffree-line-length-none -fpre-include=/usr/include/finclude/riscv64-linux-gnu/math-vector-fortran.h

Number of repeats is: 100000

Total size of one array is 4Kb

type test N mean time, ms sd time, ms min time, ms max time, ms
int32 add_v1 10 129.013 0.114 128.908 129.254
int32 add_v2 10 258.443 0.634 257.840 259.899
int32 add_v3 10 172.675 0.515 172.367 173.708
int32 mul_v1 10 129.962 0.505 129.202 130.512
int32 mul_v2 10 258.065 0.048 258.013 258.144
int32 mul_v3 10 274.803 0.317 274.258 275.170
int32 fma_v1 10 142.024 1.750 139.981 145.860
int32 fma_v2 10 187.731 0.163 187.560 187.989
int32 fma_v3 10 181.690 0.023 181.639 181.723
int32 fma_v4 10 285.900 0.073 285.753 285.983
int32 div_v1 10 343.215 0.194 342.904 343.437
int32 div_v2 10 1639.955 0.200 1639.511 1640.229
int32 inv_v1 10 275.210 2.901 269.927 279.345
int32 inv_v2.1 10 343.065 0.053 343.002 343.159
int32 inv_v2.2 10 1221.328 4.347 1217.938 1230.018
int32 inv_v2.3 10 257.583 0.032 257.539 257.634
int32 popcnt 10 2826.222 1.016 2823.288 2827.088
int32 poppar 10 2559.886 0.818 2559.225 2561.634
int32 dim 10 343.265 0.083 343.175 343.434
int32 iand 10 129.375 0.447 128.183 129.695
int32 ieor 10 129.581 0.163 129.475 130.060
int32 ior 10 128.843 0.478 127.784 129.593
int32 ishft 10 601.885 0.378 601.453 602.475
int32 ishftc 10 713.995 0.279 713.815 714.720
int32 ibset 10 259.402 1.595 257.996 262.813
int32 ibclr 10 343.380 0.156 343.278 343.821
int32 min 10 343.282 0.124 343.136 343.543
int32 max 10 347.451 2.449 345.152 353.863
int32 shifta 10 261.728 1.047 260.751 263.886
int32 shiftl 10 343.107 0.052 343.029 343.203
int32 shiftr 10 257.835 0.257 257.643 258.440
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment