Show HN: CPU Mflops in 6 languages
bolsonism.blogspot.com
bolsonism.blogspot.com
gcc-5-O3: MFLOPS(4) = 3607.9350
gcc-6-O3: MFLOPS(4) = 3781.8053
gcc-6-Os: MFLOPS(4) = 1655.9644
gcc-7-O3: MFLOPS(4) = 3909.7981
gcc-7-Os: MFLOPS(4) = 1700.6888
gcc-7-Os-native-align16: MFLOPS(4) = 2911.5069
gcc-7-O3-native: MFLOPS(4) = 6305.7652
gcc-7-O3-native-align4: MFLOPS(4) = 6428.9799
gcc-7-O3-native-align8: MFLOPS(4) = 6253.1456
gcc-7-O3-native-align16: MFLOPS(4) = 6669.3797 (best)
clang-5-O3: MFLOPS(4) = 3967.8234
clang-5-Os: MFLOPS(4) = 4003.6235
clang-5-O3-native: MFLOPS(4) = 4091.8200
clang-6-O3: MFLOPS(4) = 3991.1970
clang-6-Os: MFLOPS(4) = 3988.9485
clang-6-O3-native: MFLOPS(4) = 4049.5218
clang-6-Os-native: MFLOPS(4) = 4182.5567 (best)
clang-7-O3: MFLOPS(4) = 3810.0356
clang-7-Os: MFLOPS(4) = 3932.1634
clang-7-O3-native: MFLOPS(4) = 4114.0933
clang-7-Os-native: MFLOPS(4) = 3984.8512
gcc-native: -O3 -Wa,-q -march=native
gcc-native-alignN: -O3 -Wa,-q -falign-loops=N -falign-functions=N -march=native
Biggest impact: SSE over O3/Os over alignment, clang's -Os is sometimes faster than -O3.
Could not find clang's alignment tuning.
This is on an haswell optimized libc: darwin. linux glibc would be much slower.