Benchmarks

Similar bulk speed at both widths; extra cost on short inputs. These runs measure the current digest on the hosts below. Use them to compare within a run, then measure your own workload.

64 vs 128 bits · WebAssembly · 128-bit comparison · ChibiHash · Reproduce

For a quick check on your machine, run the browser speed test.

Hosts
Apple M1 Pro P-core, bare metal. Apple clang 21 -O3 -mcpu=native.
AMD Ryzen AI 9 HX PRO 370 Zen 5 P-core 0, bare metal. GCC 16, -O3 -march=native.
AMD EPYC 9655 Zen 5 core 0, KVM guest without frequency control. GCC 13, -O3 -march=native. Its absolute rate is indicative; within-host ratios are useful.

Cost of the 128-bit result

Both widths share one pass over the input. Each cell shows 64-bit / 128-bit results: the median of nine calibrated rounds of about 40 ms on one pinned core.

hayahash64 / hayahash128 at the current digest
host 8 B chained (ns) 8 B independent (ns) 1 MiB (GB/s)
Apple M1 Pro 7.88 / 9.25 2.70 / 3.81 30.73 / 30.76
Ryzen AI 9 HX PRO 370 4.29 / 4.90 1.97 / 2.67 61.47 / 61.31
EPYC 9655 (KVM) 4.92 / 5.66 2.14 / 3.27 54.15 / 53.99

Chained calls feed each result into the next seed and measure latency. Independent calls can overlap. Lower ns is better; higher GB/s is better.

Baseline wasm32 on the M1 Pro

Zig 0.16 compiled all rows into one wasm32-wasi module with -O3, no SIMD, and no wide multiply. The timing loops ran inside wasm under Node 26 / V8, so the JS boundary is outside every measurement.

Portable baseline WebAssembly
hash 8 B chained (ns/hash) 1 MiB (GB/s)
hayahash12810.623.34
hayahash647.723.55
ChibiHash v210.418.57
XXH3-648.217.41
XXH645.914.71
rapidhash v322.66.43

hayahash128 retains 99% of hayahash64's bulk rate here. All other rows return 64 bits.

SMHasher3 128-bit shootout

The current digest is compared using SMHasher3 commit 51d3cd1a. Speed cells are medians of three independent, round-robin processes on the two bare-metal hosts. Small-key latency is the corrected 1 to 31 byte average; bulk is the fixed 256 KiB average. The full suite ran separately on the EPYC 9655 with 128-bit-wide expectations.

128-bit hash M1 small (cy) M1 bulk (B/cy) Zen 5 small (cy) Zen 5 bulk (B/cy) full suite needs for peak speed
hayahash12838.539.7713.7131.02passordinary scalar source; auto-vectorized Zen 5 bulk
MuseAir-12824.268.657.4422.80pass64×64→128 multiply
a5hash-12822.2910.926.0022.99pass64×64→128 multiply
MeowHash--28.6432.22passx86 AES instructions
XXH3-12830.7312.6411.9248.91fail (26)wide multiply; SIMD for peak bulk
t1ha2-12864.585.8621.0316.24pass64×64→128 multiply
SpookyHash2-12853.374.2024.3915.35fail (10)ordinary 64-bit operations
prvhash-12867.451.0025.492.58pass (187/187)ordinary 64-bit operations
FarmHash-128.CC.seed160.095.6421.0916.45passordinary 64-bit operations

Small-key values are dependent latency, not independent throughput. Their raw process averages are corrected to one call-overhead baseline per host; the raw records contain every process value and the calculation. MeowHash has no M1 row because this implementation needs x86 AES instructions.

XXH3-128 has the highest bulk throughput on both hosts and fails 26 test groups. Among hashes that pass, a5hash has the lowest small-key latency. hayahash128's Zen 5 bulk result uses compiler auto-vectorization.

hayahash128 leads the passing ordinary-scalar implementations in this comparison. prvhash has 187 applicable groups; the others have 188. See the raw records and measurement method.

64-bit coverage

The native 64-bit comparison against wide-multiply and SIMD hashes has not been rerun since the digest changed. Current comparisons are limited to baseline wasm and ChibiHash.

Comparison: ChibiHash

ChibiHash uses the same portable arithmetic, making it a useful baseline. Reproduce this comparison with make -C tests run-bench; both ChibiHash versions are vendored in tests/.

Apple M1, clang -O3 -mcpu=native

Bulk speed on large keys (GB/s). Higher is better.
size (B) chibihash v1 chibihash v2 hayahash64 hayahash128
647.7010.0413.0010.39
25615.8418.0020.6719.03
102415.6219.7227.5526.28
1638414.7619.0030.4130.38
104857614.7318.9930.7330.76
Small-key latency, seed-chained (ns/hash). Lower is better.
len (B) chibihash v1 chibihash v2 hayahash64 hayahash128
49.6210.007.889.23
86.329.547.889.25
166.709.777.879.25
3212.1311.348.4110.52
6413.9812.919.6811.74
12818.2716.5212.1814.46
Small-key throughput, independent hashes (ns/hash). Lower is better.
len (B) chibihash v1 chibihash v2 hayahash64 hayahash128
47.134.212.763.83
84.414.422.703.81
165.054.882.703.81
326.815.173.724.98
648.386.384.926.15
12811.698.907.388.53

hayahash64 is faster than ChibiHash v2 at every size shown. ChibiHash v1 wins some short-input timings but fails SMHasher3. Fixed-size measurements do not capture mixed-size workloads; see dispatch tradeoffs.

AMD Zen 5, GCC 16 -march=native

Both hayahash widths against ChibiHash v2
measure chibihash v2 hayahash64 hayahash128
128 B, independent hashes (ns, lower is better) 6.485.316.06
128 B, bulk speed (GB/s, higher is better) 19.8424.2821.26
512 B, bulk speed (GB/s) 29.3242.0638.01
1 MiB, bulk speed (GB/s) 31.1361.4761.31
1 MiB, bulk speed, build without AVX-512DQ (GB/s) 31.2~35not measured

The 1 MiB result uses AVX-512DQ auto-vectorization. Without it, hayahash64 reaches about 35 GB/s from the same portable source. Both builds produce identical hashes.

Reproduce it

# The ChibiHash comparison. The references are vendored in tests/.
make -C tests run-bench

# SMHasher3, pinned to an exact upstream commit.
make -C tests/smhasher3 run

# The wasm32 shootout and the wasm-against-native bit-exactness check.
make -C tests/wasm run-kat run-bench

See the SMHasher3 guide for the full build matrix and timing corrections. Raw records include hosts, compilers, dispatch shapes, and source checksums.