On 2012-05-03 16:26, Dmitry Olshansky wrote:
It's all about RNG used behind the scenes. Default one is Mersane Twister which (AFAIK) is not particularly fast. But has a period of 2^19937 elements. You should probably use XorShift or MinstdRand generator and a version of shuffle with 2nd parameter.
I tried those two as well. Still significantly slower than what I can achieve in Java.