This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author yselivanov
Recipients Yury.Selivanov, casevh, josh.r, lemburg, mark.dickinson, pitrou, rhettinger, serhiy.storchaka, skrah, vstinner, yselivanov, zbyrne
Date 2016-02-07.21:32:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1454880774.31.0.853307484585.issue21955@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2016-02-07 21:32:54yselivanovsetrecipients: + yselivanov, lemburg, rhettinger, mark.dickinson, pitrou, vstinner, casevh, skrah, Yury.Selivanov, serhiy.storchaka, josh.r, zbyrne
2016-02-07 21:32:54yselivanovsetmessageid: <1454880774.31.0.853307484585.issue21955@psf.upfronthosting.co.za>
2016-02-07 21:32:54yselivanovlinkissue21955 messages
2016-02-07 21:32:54yselivanovcreate