Message223186
| Author |
serhiy.storchaka |
| Recipients |
josh.r, mark.dickinson, rhettinger, serhiy.storchaka, vstinner, zbyrne |
| Date |
2014年07月16日.09:28:43 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1405502923.78.0.3016866027.issue21955@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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). |
|