5 ms·
I've tested XXH3 using xxhash's built-in benchmark tool with clang-7.0.1 and gcc-8.2.1 on an Intel i9-9900K. The processor was otherwise idle, and was running a
by terrelln 8y ago
I've tested XXH3 using xxhash's built-in benchmark tool with clang-7.0.1 and gcc-8.2.1 on an Intel i9-9900K. The processor was otherwise idle, and was running at 5 GHz. The command I tested is `xxhsum -b5i10`.
SSE2: CFLAGS=-O3
AVX2: CFLAGS="-O3 -mavx2"
ARCH: CFLAGS="-O3 -march=native"
Compiler Mode Speed
gcc-8 SSE2 32.8 GB/s
clang-7 SSE2 36.5 GB/s
gcc-8 AVX2 44.1 GB/s
clang-7 AVX2 68.3 GB/s
gcc-8 ARCH 60.9 GB/s
clang-7 ARCH 69.7 GB/s
gcc nearly catches up with clang when compiled with -march=native, but with only -mavx2 it isn't performing as well.
- felixhandte 8y agoThat is pretty dang fast!
- clanrebornx 8y agoDang is a moderator of HN, you are not allowed to use the world, "dang"
- mcbain 8y agoI haven’t tried compiling this myself, but gcc does different things with a -march=x flag compared to specifying -mavx2, directly, mostly because -march implies -mtune. Trying -march=haswell might give closer results. On the other hand, if using an older gcc and it can’t identify your processor, march=native will result in mtune=generic and much head scratching with results.