std.random and mersenne twister

Andrea Fontana nospam at example.com
Fri Jul 20 02:47:51 PDT 2012


I read that default RNG in phobos is Mersenne Twister. 

I think it would be a good idea to replace it with
complementary-multiply-with-carry (cmwc). CMWC is faster (use simpler
math), has a longer period (standard implementation has a 2^131104
period vs 2^19937 of current MT implementation in phobos) and passed
diehard tests (mt passes them too)

And of course it's very easy to implement:
http://en.wikipedia.org/wiki/Multiply-with-carry#Implementation
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120720/f036a091/attachment.html>


More information about the Digitalmars-d mailing list