mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-03 05:10:16 -05:00
Adds the speed test for CRC.
This commit is contained in:
parent
9324933be0
commit
28bdd0f7b7
3 changed files with 23 additions and 2 deletions
19
speed.c
19
speed.c
|
|
@ -161,6 +161,25 @@ void speed(void)
|
|||
|
||||
printf("memset0 %"PRIu64" [MB/s]\n", ds / dt);
|
||||
|
||||
SPEED_START {
|
||||
for(j=0;j<diskmax;++j) {
|
||||
crc32c_gen(0, buffer[j], block_size);
|
||||
}
|
||||
} SPEED_STOP
|
||||
|
||||
printf("CRC table %"PRIu64" [MB/s]\n", ds / dt);
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
if (cpu_has_sse42()) {
|
||||
SPEED_START {
|
||||
for(j=0;j<diskmax;++j) {
|
||||
crc32c_x86(0, buffer[j], block_size);
|
||||
}
|
||||
} SPEED_STOP
|
||||
|
||||
printf("CRC intel-crc32l %"PRIu64" [MB/s]\n", ds / dt);
|
||||
}
|
||||
#endif
|
||||
SPEED_START {
|
||||
for(j=0;j<diskmax;++j) {
|
||||
memhash(HASH_MURMUR3, seed, digest, buffer[j], block_size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue