[Numpy-discussion] Random number generators.
Charles R Harris
charlesr.harris at gmail.com
Sun Jun 4 14:36:17 EDT 2006
But mostly Robert. I've been fooling around timing random number generators
and noticed that on an Athlon64 with 64bit binaries that the MWC8222 rng is
about 2.5x as fast as the MT19937 generator. On my machine (1.8 GHz) I get
full double 1.02e+08
full double 3.81e+07
numbers/sec, where the time includes accumulating the sums. This also
impacts the generation of normally distributed numbers
average : 1.91e-05
sigma : 1.00e-00
average : -9.73e-05
sigma : 1.00e+00
The times for 32 bit binaries is roughly the same. For generating large
arrays of random numbers on 64 bit architectures it looks like MWC8222 is a
winner. So, the question is, is there a good way to make the rng selectable?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion