Show HN: LoopMix128 – Fast C PRNG (.46ns), 2^128 Period, BigCrush/PractRand Pass
a year ago
- #PRNG
- #random-number-generation
- #performance
- LoopMix128 is an extremely fast pseudo-random number generator (PRNG) with a guaranteed period of 2^128.
- It has proven injectivity and passes both BigCrush and PractRand (32TB) tests with zero anomalies.
- High performance: 8.75x faster than Java Random, 21% faster than Java xoroshiro128++, and 75% faster than C xoroshiro128++.
- Good statistical quality: Passed TestU01's BigCrush suite and PractRand up to 32TB.
- Features a 2^128 period through 128-bit low/high counter looping.
- Proven injectivity across its 192-bit state, verified by Z3 Prover.
- Supports parallel streams due to its injective 192-bit state.
- Performance benchmarks show it outperforms other modern PRNGs like wyrand and xoroshiro128++.
- Passed multiple PractRand tests with varied initial seeds, showing zero failures and minimal suspicious results.
- Created by Daniel Cota as a result of deep exploration into PRNGs.