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

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'implements': 0.07; 'creighton': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'url:github': 0.09; 'python.': 0.11; 'generator.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:Cython': 0.16; 'wrote:': 0.16; 'laura': 0.18; 'header:In-Reply-To:1': 0.24; 'url:download': 0.24; 'header:User-Agent:1': 0.26; 'header:X -Complaints-To:1': 0.26; 'random': 0.29; 'usually': 0.33; 'to:addr :python-list': 0.35; 'something': 0.35; 'url:org': 0.36; 'subject:: ': 0.37; 'received:org': 0.38; 'to:addr:python.org': 0.39; 'grab': 0.61; 'charset:windows-1252': 0.65; 'subject:. ': 0.66; 'url:master': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Sturla Molden <sturla.molden@gmail.com>
Subject Re: Python Random vs. Cython C Rand for Dice Rolls
Date Mon, 08 Jun 2015 23:44:53 +0200
References <mailman.262.1433697446.13271.python-list@python.org><55748e6d$0$13008$c3e8da3$5496439d@news.astraweb.com> <201506081733.t58HX7Ft006182@fido.openend.se>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host 60-177-11.connect.netcom.no
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
In-Reply-To <201506081733.t58HX7Ft006182@fido.openend.se>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.305.1433799910.13271.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1433799910 news.xs4all.nl 2870 [2001:888:2000:d::a6]:58777
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:92350

Show key headers only | 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