3 ms·
One more example: pseudorandom number generation (non-cryptographic). There are lots of algorithms out there, and lots more you could design, but the Mersenne
by mturmon 15y ago
One more example: pseudorandom number generation (non-cryptographic). There are lots of algorithms out there, and lots more you could design, but the Mersenne twister has pretty much become the first-choice algorithm.
Especially with linear congruential generators, it's easy for people who don't know what they're doing to add "extra randomization" that makes the resulting numbers worse than the originals.
It's better for most people to not get fancy and use the standard algorithm.
- marshray 15y agoMT uses a lot of memory. IIRC, it's multiple KiB where 64 bits ought to do fine. A modern CSPRNG like the SHA-3 candidate Skein can produce random data at a steady rate of only a few cycles per byte. I wonder if at some point something like that will dethrone MT for non-crypto PRNGs.
- mturmon 15y agoSomething will dethrone the MT -- everything gets dethroned eventually. Besides what you mention, its algorithm is somewhat over-complex. But it will be a long time before an alternative is better in a compelling way. And take a look at the list of implementations for the MT: http://en.wikipedia.org/wiki/Mersenne_twister#Implementations_in_various_languages http://en.wikipedia.org/wiki/Mersenne_twister#Implementation... That's not a single throne, it's a multifaceted empire.