项目作者: cyring

项目描述 :
CRC32 Benchmark for x86_64 processors
高级语言: C
项目地址: git://github.com/cyring/crc32bench.git
创建时间: 2017-11-23T15:02:34Z
项目社区:https://github.com/cyring/crc32bench

开源协议:GNU General Public License v2.0

下载


crc32bench

CRC32 Benchmark for x86_64 processors

- Prerequisities -

  1. C compiler: gcc or clang
  2. TASKSET: part of the util-linux package

- Compilation -

  1. cc -Wall -O0 crc32bench.c -o crc32bench

- Input -

  1. # ASM version
  2. taskset -c 1 ./crc32bench a GenuineIntel AuthenticAMD
  3. # C version
  4. taskset -c 1 ./crc32bench c GenuineIntel AuthenticAMD

- Results (gcc) -

  1. # ASM version
  2. Benchmark = 8882632044 cycles
  3. crc32bench(GenuineIntel,12) => 75a2ba39
  4. crc32bench(GenuineIntel,12) => 75a2ba39
  5. # C version (gcc)
  6. Benchmark = 31046108769 cycles
  7. crc32bench(GenuineIntel,12) => 75a2ba39
  8. crc32bench(AuthenticAMD,12) => 3485bbd3
  9. # C version (clang)
  10. Benchmark = 17586801852 cycles
  11. crc32bench(GenuineIntel,12) => 75a2ba39
  12. crc32bench(AuthenticAMD,12) => 3485bbd3