davidbau / seedrandom

seeded random number generator for Javascript
2.04k stars 160 forks source link

Seedrandom is slow #13

Closed davidbau closed 9 years ago

davidbau commented 9 years ago

Seedrandom is careful, but slow. It is about 9x slower than native Math.random(), which is acceptable if you don't need too much randomness. But if you need a lot of randomness, you want a seedable prng about the same speed as Math.random().

A possible solution is to offer alternate algorithms that get closer to native random such as: https://github.com/davidbau/seedrandom/tree/xorshift/xor

davidbau commented 9 years ago

OK, merged to master.

Still needed:

davidbau commented 9 years ago

Fixed in v2.4.0