3 ms·
There are several PRNGs that are faster and more random than Mersenne Twister.
by fanf2 3y ago
There are several PRNGs that are faster and more random than Mersenne Twister.
- nurandal 3y agoSome example benchmarks which compare MT against other newer algorithms in a couple of blog posts here: https://nullprogram.com/blog/2017/09/21/ https://nullprogram.com/blog/2017/09/21/ https://pixelesque.net/blog/2020/08/prng-evaluation-and-benchmarks-for-monte-carlo-simulations/ https://pixelesque.net/blog/2020/08/prng-evaluation-and-benc...
- loeg 3y agoThe other big nuisance of the MT is that its state is huge -- the most common version, MT19937, has ~2500 bytes of state and generates 32-bit numbers. A very good 64-bit PRNG only needs 16 bytes of state and a very good 32-bit PRNG only needs 8 bytes of state. That's >300x smaller. This is somewhat related to it being slow, of course, but also somewhat orthogonal.