[issue16674] Faster getrandbits() for small integers

2013-01-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue16674] Faster getrandbits() for small integers

2013-01-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset b0926ddcab5e by Serhiy Storchaka in branch 'default': Issue #16674: random.getrandbits() is now 20-40% faster for small integers. http://hg.python.org/cpython/rev/b0926ddcab5e -- nosy: +python-dev ___ Pyt

[issue16674] Faster getrandbits() for small integers

2013-01-03 Thread Mark Dickinson
Mark Dickinson added the comment: Looks good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue16674] Faster getrandbits() for small integers

2012-12-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16674] Faster getrandbits() for small integers

2012-12-13 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue16674] Faster getrandbits() for small integers

2012-12-13 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The proposed patch adds a fast patch for generating small integers (the most common use case). Microbenchmark: $ ./python -m timeit -s "import random; r=random.getrandbits; n=30" "r(n);r(n);r(n);r(n);r(n);r(n);r(n);r(n);r(n);r(n)" Non patched: 4.27 usec