Yury Selivanov added the comment: 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 ---------- Added file: http://bugs.python.org/file41843/fastint6.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21955> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com