[issue43040] random.py randrange() is very slow if the range is a power of 2.

Donovan Baarda report at bugs.python.org
Wed Jan 27 17:48:33 EST 2021


Donovan Baarda <abo at minkirri.apana.org.au> added the comment:

FTR, more articles about the slowness of generating random integers in Python;

https://lemire.me/blog/2016/03/21/ranged-random-number-generation-is-slow-in-python/

https://www.reddit.com/r/Python/comments/jn0bb/randomrandint_vs_randomrandom_why_is_one_15x/

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43040>
_______________________________________


More information about the Python-bugs-list mailing list