Message177436
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 per loop
Patched: 2.97 usec per loop |
|
Date |
User |
Action |
Args |
2012-12-13 20:54:36 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, mark.dickinson |
2012-12-13 20:54:36 | serhiy.storchaka | set | messageid: <1355432076.17.0.54183868892.issue16674@psf.upfronthosting.co.za> |
2012-12-13 20:54:35 | serhiy.storchaka | link | issue16674 messages |
2012-12-13 20:54:35 | serhiy.storchaka | create | |
|