Message259804
Attaching another patch - fastint6.patch that only optimizes longs (no FP fast path).
> #26288 brought a great speedup for floats. With fastint5_4.patch *on top of #26288* I see no improvement for floats and a big slowdown for _decimal.
What benchmark did you use? What were the numbers? I'm asking because before you benchmarked different patches that are conceptually similar to fastint5, and the result was that decimal was 5% faster with fast paths for just longs, and 6% slower with fast paths for longs & floats.
Also, some quick timeit results (quite stable from run to run):
-m timeit -s "x=2" "x + 10 + x * 20 + x* 10 + 20 -x"
3.6: 0.150usec 3.6+fastint: 0.112usec
-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)"
3.6: 0.425usec 3.6+fastint: 0.302usec |
|
Date |
User |
Action |
Args |
2016-02-07 21:32:54 | yselivanov | set | recipients:
+ yselivanov, lemburg, rhettinger, mark.dickinson, pitrou, vstinner, casevh, skrah, Yury.Selivanov, serhiy.storchaka, josh.r, zbyrne |
2016-02-07 21:32:54 | yselivanov | set | messageid: <1454880774.31.0.853307484585.issue21955@psf.upfronthosting.co.za> |
2016-02-07 21:32:54 | yselivanov | link | issue21955 messages |
2016-02-07 21:32:54 | yselivanov | create | |
|