Skip to content

Commit

Permalink
t1ha-bench: update wyhash to 20221102.
Browse files Browse the repository at this point in the history
  • Loading branch information
erthink committed May 25, 2023
1 parent f60a8bf commit adf66a7
Show file tree
Hide file tree
Showing 5 changed files with 253 additions and 154 deletions.
2 changes: 1 addition & 1 deletion tests/bench.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ void bench_size(const unsigned size, const char *caption) {
/* TODO: thunk_HighwayHash64_VSX() */
}
if (is_selected(bench_wyhash)) {
bench("wyhash_v7", thunk_wyhash_v7, buffer, size, seed);
bench("wyhash_20221102", thunk_wyhash_20221102, buffer, size, seed);
}
free(buffer);
}
8 changes: 4 additions & 4 deletions tests/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ uint64_t thunk_HighwayHash64_SSE41(const void *input, size_t length,
uint64_t thunk_HighwayHash64_VSX(const void *input, size_t length,
uint64_t seed);

/* wyhash v4 */
uint64_t thunk_wyhash_v7(const void *input, size_t length, uint64_t seed);
extern const uint64_t refval_wyhash_v7[];
bool wyhash_v7_selftest(void);
/* wyhash 20221102 */
uint64_t thunk_wyhash_20221102(const void *input, size_t length, uint64_t seed);
extern const uint64_t refval_wyhash_20221102[];
bool wyhash_20221102_selftest(void);
9 changes: 5 additions & 4 deletions tests/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,10 @@ int main(int argc, const char *argv[]) {

failed |= verify("StadtX", thunk_StadtX, refval_StadtX);

if (wyhash_v7_selftest())
if (wyhash_20221102_selftest())
puts("wyhash SELF-CHECK FAILED!\n");
failed |= verify("wyhash_v7", thunk_wyhash_v7, refval_wyhash_v7);
failed |=
verify("wyhash_20221102", thunk_wyhash_20221102, refval_wyhash_20221102);

if (failed)
puts("Verification FAILED!\n");
Expand All @@ -397,8 +398,8 @@ int main(int argc, const char *argv[]) {
hash_function = thunk_StadtX;
hash_name = "StadtX";
} else if (is_selected(bench_64 | bench_wyhash)) {
hash_function = thunk_wyhash_v7;
hash_name = "wyhash_v7";
hash_function = thunk_wyhash_20221102;
hash_name = "wyhash_20221102";
#ifndef T1HA2_DISABLED
} else if (is_selected(bench_64 | bench_2)) {
hash_function = t1ha2_atonce;
Expand Down
Loading

0 comments on commit adf66a7

Please sign in to comment.