Message236439
| Author |
serhiy.storchaka |
| Recipients |
josh.r, rhettinger, serhiy.storchaka, vstinner, wbolster |
| Date |
2015年02月23日.11:26:40 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1424690800.7.0.0510580666562.issue23493@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
My interpretation of the results. In CPython using operator.itemgetter() makes sorting up to 2 times faster (only 25% faster with string keys), in PyPy it make sorting slightly slower (because operator.itemgetter() is implemented in Python, but the lambda is more specialized and could be better optimized).
The lambda looks more clear to me, and I think there is the possibility to optimize CPython to replace the body of such functions with builtins from the operator module. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2015年02月23日 11:26:40 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, vstinner, wbolster, josh.r |
| 2015年02月23日 11:26:40 | serhiy.storchaka | set | messageid: <1424690800.7.0.0510580666562.issue23493@psf.upfronthosting.co.za> |
| 2015年02月23日 11:26:40 | serhiy.storchaka | link | issue23493 messages |
| 2015年02月23日 11:26:40 | serhiy.storchaka | create |
|