diff options
| author | Marc Tiehuis <marc@tiehu.is> | 2019-08-26 22:32:39 +1200 |
|---|---|---|
| committer | Sahnvour <Sahnvour@users.noreply.github.com> | 2019-08-27 19:42:37 +0200 |
| commit | fbcdf78cbd5ff955d1aec0e55026168eed8d43f6 (patch) | |
| tree | 3ed4bd90f80ec8932c8826f02b2640dcb8ff3df1 /std/hash/benchmark.zig | |
| parent | 90e921f7a7356cda56e98367687889eb34ce0384 (diff) | |
| download | zig-fbcdf78cbd5ff955d1aec0e55026168eed8d43f6.tar.gz zig-fbcdf78cbd5ff955d1aec0e55026168eed8d43f6.zip | |
Simplify wyhash and improve speed
This removes the exposed stateless variant since the standard variant
has similar speed now.
Using `./benchmark --filter wyhash --count 1024`, the speed change has
changed from:
wyhash
iterative: 4093 MiB/s [6f76b0d5db7db34c]
small keys: 3132 MiB/s [28c2f43c70000000]
to
wyhash
iterative: 6515 MiB/s [673e9bb86da93ea4]
small keys: 10487 MiB/s [28c2f43c70000000]
Diffstat (limited to 'std/hash/benchmark.zig')
| -rw-r--r-- | std/hash/benchmark.zig | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/std/hash/benchmark.zig b/std/hash/benchmark.zig index 314f2572cd..d110684a8e 100644 --- a/std/hash/benchmark.zig +++ b/std/hash/benchmark.zig @@ -29,11 +29,6 @@ const hashes = [_]Hash{ .init_u64 = 0, }, Hash{ - .ty = hash.WyhashStateless, - .name = "wyhash-stateless", - .init_u64 = 0, - }, - Hash{ .ty = hash.SipHash64(1, 3), .name = "siphash(1,3)", .init_u8s = siphash_key, @@ -91,7 +86,7 @@ const Result = struct { throughput: u64, }; -const block_size: usize = 8192; +const block_size: usize = 8 * 8192; pub fn benchmarkHash(comptime H: var, bytes: usize) !Result { var h = blk: { |
