[pypy-issue] [issue813] Random is slower than cpython

Jean-Paul Calderone tracker at bugs.pypy.org
Fri Jul 29 00:26:28 CEST 2011


Jean-Paul Calderone <exarkun at twistedmatrix.com> added the comment:

Let the loops run a little longer, the story changes.  For 100000 loops:


Random.random()  0.0205929279327
Random.randint()  0.232482910156
exarkun at boson:/tmp$ ~/Downloads/pypy-c-jit-45960-c3cdcacec880-linux/bin/pypy 
zonk.py 
Random.random()  0.00938701629639
Random.randint()  0.0481588840485


This sounds a lot like "PyPy is slower than CPython in general until the JIT 
kicks in", and probably has nothing to do with the random module.

----------
nosy: +calderone
status: unread -> chatting

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue813>
________________________________________


More information about the pypy-issue mailing list