Non-cryptographic
xxHash3 / XXH128
Designed by Yann Collet (also of LZ4 / Zstandard) and released in 2019, xxHash3 is the third generation of the xxHash family and the fastest non-cryptographic hash in widespread use , tens of GiB/s on a single modern core thanks to SIMD paths, frequently limited by memory bandwidth rather than the algorithm.
Variants
- XXH64 , 64-bit output, the legacy workhorse (2014).
- XXH3 / XXH3_64bits , 64-bit output, 2019 redesign.
- XXH128 / XXH3_128bits , 128-bit output, otherwise identical to XXH3.
At a glance
| Output | 64 or 128 bits |
|---|---|
| Throughput | 10–30+ GiB/s on a single modern core |
| Construction | Multiply-add lanes (SIMD-friendly), seeded mixer |
| Year | 2019 (XXH3 / XXH128) |
| Standard | None; reference impl by Cyan4973 on GitHub |
| Status | Non-cryptographic; defaults are seedable to defeat trivial flooding |
Where it is used
- Zstandard , content checksums.
- LZ4 frame format , integrity.
- RocksDB, DuckDB, Apache Iceberg , in-memory dedup, partition hashing.
- Rust’s
twox-hashcrate, the default in many community tools. - Filesystems / backup tools , e.g., bcachefs uses XXH128 for content addressing.
Why so fast
- Operates on 64-byte stripes that map naturally to AVX2 / AVX-512 / NEON.
- Avoids expensive instructions: no carry-less multiply, no rotate-with-carry, no integer divisions.
- Mostly fused multiply-add and XOR, allowing the CPU’s out-of-order engine to keep wide vector lanes busy.
- Small (~256-byte) inner state, so the hash itself never causes cache pressure even at GB/s rates.
When NOT to use it
xxHash3 is nota cryptographic hash. Differentials are findable in seconds with a SAT solver. Do not use xxHash for content addressing where adversaries could submit inputs, for MACs, or for deduplication that needs to survive an attacker. For those, choose BLAKE3 (often within 2× the speed) or SHA-256.
Try it
xxHash variants are in the comparator catalog; for raw throughput comparisons see the comparator.
References
- xxhash.com , specification and reference benchmarks
- Cyan4973/xxHash , reference implementation
- BLAKE3 · MurmurHash3
Visualize
xxHash3 (64-bit) on your input
11 bytes · 0-bit digest
Hex digest
Bit grid (0 bits, teal = 1, slate = 0)
Byte pixel art (0 bytes, hue = byte value mod 360°)
Avalanche , flipping the lowest bit of the first input byte changed 0 of 0 output bits
Quick quiz
Test yourself on xxhash3
10 multiple-choice questions. Pick an answer for each, then submit to see explanations.
Q1.Who designed xxHash3?
Q2.What's xxHash3's typical throughput on a modern CPU core?
Q3.Is xxHash3 cryptographically secure?
Q4.What's the output size of XXH3 (the 64-bit variant)?
Q5.Which compression library uses xxHash for content checksums?
Q6.Why is xxHash3 so fast on modern CPUs?
Q7.Is xxHash standardized in an RFC?
Q8.Which is NOT in the xxHash family?
Q9.Which Rust crate provides xxHash for HashMaps?
Q10.When should you NOT use xxHash3?