LoopMix128: Fast and Robust 2^128 Period PRNG This repository contains LoopMix128 , an extremely fast pseudo-random number generator (PRNG) with a guaranteed period of 2^128, proven injectivity, and clean passes in both BigCrush and PractRand (32TB). It is designed for non-cryptographic applications where speed and statistical quality are important. Features High Performance: Significantly faster than standard library generators and competitive with or faster than other modern high-speed PRNGs like wyrand and xoroshiro128++. Significantly faster than standard library generators and competitive with or faster than other modern high-speed PRNGs like wyrand and xoroshiro128++. Good Statistical Quality: Has passed TestU01's BigCrush suite and PractRand (up to 32TB) with zero anomalies. Has passed TestU01's BigCrush suite and PractRand (up to 32TB) with zero anomalies. 2^128 Period: Minimum period length of 2^128 through its 128 bit low/high counter looping. Minimum period length of 2^128 through its 128 bit low/high counter looping. Proven Injectivity: Z3 Prover proven injectivity across its 192 bit state. (z3 script) (results) Z3 Prover proven injectivity across its 192 bit state. (z3 script) (results) Parallel Streams: The injective 192 bit state facilitates parallel streams as outlined below. Performance Speed: 8.75x Java random, 21% faster than Java xoroshiro128++, 75% faster than C xoroshiro128++ (benchmark) 8.75x Java random, 21% faster than Java xoroshiro128++, 75% faster than C xoroshiro128++ (benchmark) Passed 256M to 32TB PractRand with zero anomalies (results) Passed BigCrush with these lowest p-values: (results) 0.01 sknuth_MaxOft (N=20, n=10000000, r=0, d=100000, t=32), Sum ChiSqr 0.02 sknuth_CouponCollector (N=1, n=200000000, r=27, d=8), ChiSqr 0.02 svaria_WeightDistrib (N=1, n=20000000, r=28, k=256, Alpha=0, Beta=0.25), ChiSqr Algorithm Details // Golden ratio fractional part * 2^64 const uint64_t GR = 0x9e3779b97f4a7c15ULL; // Initialized to non-zero wit...
First seen: 2025-05-10 22:20
Last seen: 2025-05-11 03:20