

Join the discussion
Write your take first — we'll ask for email only when you're ready to publish.
- Hacker News
- I'm really curious... How did you manage to post this link before I did?by AlanZucconi
- I have your feed in my RSS reader! This seemed like something HN would be interested in.by tobr
- Ah yes, Xorshift, the RANDU [1] of the 21st century [2].
There is no real use case for better non-CS generators, as explained by adrian_b back in 2021 [3].
[1] https://en.wikipedia.org/wiki/RANDU [2] https://arxiv.org/abs/1908.10020 [3] https://news.ycombinator.com/item?id=28886698
by saithound - I don't know about all that, but I use Marsaglias for generating noise samples in MCUs like Pico. It's the fastest option there is for such devices.by mallets
- > no real use case
Yes there is. Not every system has the need or the resources to maintain a secure random sequence. You may also want a reproducible pseudo-random sequence in generative code that logs the seeds. Because of the misguided attitude that nobody needs these features, everyone who does need them has to roll their own now.
- I’m not sure what point you’re trying to make, exactly, but a use case for better non-CS generators has always been stochastic simulation, especially simulation/sampling approaches that are bound by the number and quality of uniform variates per second.
As someone who has spent considerable time working in these areas, I still appreciate advances.
by moregrist - by YZF
- I’ve replaced Lua’s random by this. I’ve posted about it here https://nullonerror.org/2025/08/02/replacing-lua-s-math-rand...by mococa
- Lua 5.4 and 5.5 use xoshiro256**: https://www.lua.org/manual/5.4/manual.html#pdf-math.randomby dchest
- A number of years ago I implemented xoshiro256** for the GFortran compiler. Previously it used Marsaglia's KISS generator, which wasn't bad but perhaps no longer state of the art on the TESTU1 etc. tests. Additionally, xoshiro256** can be used in parallel by multiple threads; that took a bit of clever hacking to work around the limitations of the Fortran intrinsics API.by jabl
- Xorshift-36 for the PDP-10, with help from Sebastiano Vigna.
- This is xoroshiro not xorshift. It's right there in the URL.by avadodin