Python Random vs. Cython C Rand for Dice Rolls

Sturla Molden sturla.molden at gmail.com
Mon Jun 8 17:44:53 EDT 2015


On 08/06/15 19:33, Laura Creighton wrote:

> Better C random number generator.
> http://www.pcg-random.org/download.html

Or for something less minimalistic, just grab randomkit.c and 
randomkit.h from NumPy, which implements the same Mersenne Twister as 
Python. That is what I usually do to get fast random numbers from Cython

https://github.com/numpy/numpy/tree/master/numpy/random/mtrand


Sturla




More information about the Python-list mailing list