Message259673
As to weather we want this patch committed or not, here's a mini-macro-something benchmark:
$ ./python.exe -m timeit -s "x=2" "x + 10 + x * 20 + x* 10 + 20 -x"
10000000 loops, best of 3: 0.115 usec per loop
$ python3.5 -m timeit -s "x=2" "x + 10 + x * 20 + x* 10 + 20 -x"
10000000 loops, best of 3: 0.141 usec per loop
$ ./python.exe -m timeit -s "x=2" "x*2.2 + 2 + x*2.5 + 1.0 - x / 2.0 + (x+0.1)/(x-0.1)*2 + (x+10)*(x-30)"
1000000 loops, best of 3: 0.308 usec per loop
$ python3.5 -m timeit -s "x=2" "x*2.2 + 2 + x*2.5 + 1.0 - x / 2.0 + (x+0.1)/(x-0.1)*2 + (x+10)*(x-30)"
1000000 loops, best of 3: 0.652 usec per loop
Still, longs are faster 30-50%, FP are faster 100%. I think it's a very good result. Please don't block this patch. |
|
Date |
User |
Action |
Args |
2016-02-05 16:32:58 | yselivanov | set | recipients:
+ yselivanov, lemburg, rhettinger, mark.dickinson, pitrou, vstinner, casevh, skrah, Yury.Selivanov, serhiy.storchaka, josh.r, zbyrne |
2016-02-05 16:32:58 | yselivanov | set | messageid: <1454689978.57.0.604322118797.issue21955@psf.upfronthosting.co.za> |
2016-02-05 16:32:58 | yselivanov | link | issue21955 messages |
2016-02-05 16:32:58 | yselivanov | create | |
|