Message259706
inline-2.patch: more complete version of inline.patch.
Optimize the same instructions than Python 2: BINARY_ADD, INPLACE_ADD, BINARY_SUBSTRACT, INPLACE_SUBSTRACT.
Quick & *dirty* microbenchmark:
$ ./python -m timeit -s 'x=1' 'x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x'
* Original: 287 ns
* fastint5_2.patch: 261 ns (-9%)
* inline-2.patch: 212 ns (-26%)
$ ./python -m timeit -s 'x=1000; y=1' 'x-y-y-y-y-y-y-y-y-y-y-y-y-y-y-y-y-y-y-y-y-y-y-y-y'
* Original: 517 ns
* fastint5_2.patch: 469 ns (-9%)
* inline-2.patch: 442 ns (-15%)
Ok. Now I'm lost. We have so many patches :-) Which one do you prefer?
In term of speedup, I expect that Python 2 design (inline-2.patch) cannot be beaten in term of performance by another another option since it doesn't need any C code and does everything in ceval.c. |
|
Date |
User |
Action |
Args |
2016-02-06 01:31:58 | vstinner | set | recipients:
+ vstinner, lemburg, rhettinger, mark.dickinson, pitrou, casevh, skrah, Yury.Selivanov, serhiy.storchaka, yselivanov, josh.r, zbyrne |
2016-02-06 01:31:57 | vstinner | set | messageid: <1454722317.71.0.39458019109.issue21955@psf.upfronthosting.co.za> |
2016-02-06 01:31:57 | vstinner | link | issue21955 messages |
2016-02-06 01:31:56 | vstinner | create | |
|