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).
History
Date User Action Args
2014-07-16 09:28:43serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, mark.dickinson, vstinner, josh.r, zbyrne
2014-07-16 09:28:43serhiy.storchakasetmessageid: <1405502923.78.0.3016866027.issue21955@psf.upfronthosting.co.za>
2014-07-16 09:28:43serhiy.storchakalinkissue21955 messages
2014-07-16 09:28:43serhiy.storchakacreate