Message223186
Confirmed speed up about 20%. Surprisingly it affects even integers outside of the of preallocated small integers (-5...255).
Before:
$ ./python -m timeit -s "x=10" "x+x"
10000000 loops, best of 3: 0.143 usec per loop
$ ./python -m timeit -s "x=1000" "x+x"
1000000 loops, best of 3: 0.247 usec per loop
After:
$ ./python -m timeit -s "x=10" "x+x"
10000000 loops, best of 3: 0.117 usec per loop
$ ./python -m timeit -s "x=1000" "x+x"
1000000 loops, best of 3: 0.209 usec per loop
All measures are made with modified timeit (issue21988). |
|
| Date |
User |
Action |
Args |
| 2014-07-16 09:28:43 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, mark.dickinson, vstinner, josh.r, zbyrne |
| 2014-07-16 09:28:43 | serhiy.storchaka | set | messageid: <[email protected]> |
| 2014-07-16 09:28:43 | serhiy.storchaka | link | issue21955 messages |
| 2014-07-16 09:28:43 | serhiy.storchaka | create | |
|