numpy performance and random numbers

sturlamolden sturlamolden at yahoo.no
Sat Dec 19 08:53:52 EST 2009


On 19 Des, 12:29, Steven D'Aprano <st... at REMOVE-THIS-
cybersource.com.au> wrote:

> Perhaps
> the Matlab random number generator is a low-quality generator which is
> fast but not very random. Python uses a very high quality RNG which is
> not cheap.

Marsaglia and Matlab's implementation of ziggurat uses a slightly
lower quality RNG for uniform deviates than NumPy's Mersenne Twister.
But the real speed advantage comes from avoiding trancendental
functions. I have for some time thought of contributing a ziggurat
generator to NumPy, while retaining the Mersenne Twister internally,
but I have not got around to do it.





More information about the Python-list mailing list