Non-cryptographic
t1ha (Fast Positive Hash)
Designed by Leonid Yuriev (2016+). The full name “Fast Positive Hash” emphasizes both speed and clean SMHasher bias results. The t1ha family sits in the same speed tier as xxHash3 and CityHash, with slightly different optimization choices for different CPU microarchitectures.
The variants
- t1ha0 , portable baseline; works on any 32 / 64-bit CPU.
- t1ha1 , 64-bit-tuned, classic implementation.
- t1ha2 , updated mixer, 64 / 128-bit output.
- t1ha3 , experimental high-speed variant.
- t1ha0_ia32aes , AES-NI-accelerated variant.
At a glance
| Output | 64 or 128 bits |
|---|---|
| Throughput | 10-25 GiB/s on modern CPUs |
| Project | erthink/t1ha |
| Status | Non-cryptographic; chosen-input vulnerable |
Where it shows up
- libmdbx , high-performance key-value storage (Yuriev’s own project) uses t1ha.
- ClickHouse , supports t1ha as a SQL hash function.
- Some Russian financial / database backends.
- SMHasher benchmark , canonical reference results.
vs xxHash3 and CityHash
On modern Intel / AMD CPUs, t1ha and xxHash3 trade leadership depending on input size and exact instruction set. The choice in practice is ecosystem-driven: pick the hash your platform’s community has the most tooling for. SMHasher distribution scores are competitive across the three.
References
- erthink/t1ha source repository
- SMHasher fork , benchmarks t1ha alongside competitors
- xxHash3 · MurmurHash3
Quick quiz
Test yourself on t1ha
10 multiple-choice questions. Pick an answer for each, then submit to see explanations.
Q1.Who designed t1ha?
Q2.What does t1ha stand for?
Q3.Output sizes available:
Q4.Is t1ha cryptographic?
Q5.Which variant is AES-NI accelerated?
Q6.Database that supports t1ha as a SQL function:
Q7.t1ha throughput on modern CPUs:
Q8.Which project uses t1ha as its primary content hash?
Q9.t1ha is a member of which Wikipedia family?
Q10.t1ha vs xxHash3: