[HN Gopher] Show HN: LoopMix128 - Fast C PRNG (.46ns), 2^128 Per...
___________________________________________________________________
Show HN: LoopMix128 - Fast C PRNG (.46ns), 2^128 Period,
BigCrush/PractRand Pass
LoopMix128 is a fast C PRNG I wrote for non-cryptographic tasks.
GitHub (MIT): https://github.com/danielcota/LoopMix128 Highlights:
* ~0.46 ns/value (GCC 11.4, -O3 -march=native), 75% faster than
xoroshiro128++. * Passes TestU01 BigCrush & PractRand (32TB). *
Guaranteed 2^128 period. * Proven injective (192-bit state) via Z3
SMT solver; allows parallel streams. * Core requires only
stdint.h. Seeking feedback on design, use cases, or further
testing.
Author : the_othernet
Score : 18 points
Date : 2025-05-10 21:25 UTC (1 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| zX41ZdbW wrote:
| Also interesting to include PCG for comparison.
| zX41ZdbW wrote:
| > after he fell down the PRNG rabbit-hole by circumstance
|
| Curious to learn more about the circumstance :)
| jrapdx3 wrote:
| From the Github repo: "Created by Daniel Cota after he fell down
| the PRNG rabbit-hole by circumstance." I understand how that can
| happen.
|
| Wondering how this PRNG compares to PCG PRNGs that also claim to
| be "simple fast space-efficient statistically good algorithms"
| and "hard to predict" [0].
|
| In any case, it's good to see the excellent work being
| accomplished in this space.
|
| [0] https://www.pcg-random.org/
___________________________________________________________________
(page generated 2025-05-10 23:00 UTC)