Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #92350

Re: Python Random vs. Cython C Rand for Dice Rolls

From Sturla Molden <sturla.molden@gmail.com>
Subject Re: Python Random vs. Cython C Rand for Dice Rolls
Date 2015-06-08 23:44 +0200
References <mailman.262.1433697446.13271.python-list@python.org><55748e6d$0$13008$c3e8da3$5496439d@news.astraweb.com> <201506081733.t58HX7Ft006182@fido.openend.se>
Newsgroups comp.lang.python
Message-ID <mailman.305.1433799910.13271.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Python Random vs. Cython C Rand for Dice Rolls "C.D. Reimer" <chris@cdreimer.com> - 2015-06-07 10:17 -0700
  Re: Python Random vs. Cython C Rand for Dice Rolls Steven D'Aprano <steve@pearwood.info> - 2015-06-08 04:33 +1000
    Re: Python Random vs. Cython C Rand for Dice Rolls "C.D. Reimer" <chris@cdreimer.com> - 2015-06-07 11:56 -0700
    Re: Python Random vs. Cython C Rand for Dice Rolls Laura Creighton <lac@openend.se> - 2015-06-08 19:33 +0200
    Re: Python Random vs. Cython C Rand for Dice Rolls Sturla Molden <sturla.molden@gmail.com> - 2015-06-08 23:44 +0200

csiph-web