[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

Serhiy Storchaka report at bugs.python.org
Sun Jun 7 23:36:24 CEST 2015


Serhiy Storchaka added the comment:

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))"

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20186>
_______________________________________


More information about the Python-bugs-list mailing list