CRC32 Benchmark for x86_64 processors
CRC32 Benchmark for x86_64 processors
C compiler: gcc or clang
TASKSET: part of the util-linux package
cc -Wall -O0 crc32bench.c -o crc32bench
# ASM version
taskset -c 1 ./crc32bench a GenuineIntel AuthenticAMD
# C version
taskset -c 1 ./crc32bench c GenuineIntel AuthenticAMD
# ASM version
Benchmark = 8882632044 cycles
crc32bench(GenuineIntel,12) => 75a2ba39
crc32bench(GenuineIntel,12) => 75a2ba39
# C version (gcc)
Benchmark = 31046108769 cycles
crc32bench(GenuineIntel,12) => 75a2ba39
crc32bench(AuthenticAMD,12) => 3485bbd3
# C version (clang)
Benchmark = 17586801852 cycles
crc32bench(GenuineIntel,12) => 75a2ba39
crc32bench(AuthenticAMD,12) => 3485bbd3