homepage

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 serhiy.storchaka
Recipients georg.brandl, larry, python-dev, serhiy.storchaka, taleinat
Date 2015年06月07日.21:36:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1433712984.71.0.630037257612.issue20186@psf.upfronthosting.co.za>
In-reply-to
Content
The operator module is rarely used in the stdlib, but if it is used in user code (mainly with map(), reduce() or like) the performance often is important. You can use microbenchmarks like following (operator.add is twice faster than lambda x, y: x + y).
 ./python -m timeit -s "import operator; a = list(range(10000)); b = a[:]" -- "list(map(operator.add, a, b))"
History
Date User Action Args
2015年06月07日 21:36:24serhiy.storchakasetrecipients: + serhiy.storchaka, georg.brandl, taleinat, larry, python-dev
2015年06月07日 21:36:24serhiy.storchakasetmessageid: <1433712984.71.0.630037257612.issue20186@psf.upfronthosting.co.za>
2015年06月07日 21:36:24serhiy.storchakalinkissue20186 messages
2015年06月07日 21:36:24serhiy.storchakacreate

AltStyle によって変換されたページ (->オリジナル) /