I have been wondering what would be the advantage of using mt19937_64 (for instance in boost, or c++11) over its 32 bit variant?
Thanks.
I have been wondering what would be the advantage of using mt19937_64 (for instance in boost, or c++11) over its 32 bit variant?
Thanks.
It has a larger seed, allowing for more distinct pseudorandom sequences. Essentially this means you can put more randomness in. It produces 64-bit numbers, so you get more pseudorandomness out at a time. And, it is implemented using 64-bit operations, so it will perhaps go faster on a 64-bit machine and slower on a 32-bit machine.
Both contain the same amount of total state, 64 × 312 = 19968 bits, so the sequences are equally predictable in that sense. If you want more state, you can parameterize it yourself using std::mersenne_twister_engine
.