Add MetroHash128 for speed measurement

This commit is contained in:
Andrea Mazzoleni 2019-11-23 08:26:57 +01:00
parent d294c11b43
commit b725333a49
6 changed files with 162 additions and 0 deletions

View file

@ -216,6 +216,7 @@ void speed(int period)
printf("%8s", "best");
printf("%8s", "murmur3");
printf("%8s", "spooky2");
printf("%8s", "metro");
printf("\n");
printf("%8s", "hash");
@ -245,6 +246,14 @@ void speed(int period)
memhash(HASH_SPOOKY2, seed, digest, v[j], size);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
fflush(stdout);
SPEED_START {
for (j = 0; j < nd; ++j)
memhash(HASH_METRO, seed, digest, v[j], size);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
printf("\n");
printf("\n");