[issue31141] Start should be a keyword argument of the built-in sum
Mark Bell
report at bugs.python.org
Wed Aug 16 08:52:16 EDT 2017
Mark Bell added the comment:
I ran some timing tests of the patch I submitted to compare it to the current build of Python. Using timit on the current master branch I got:
python.exe -m timeit "sum(())" .... 1.12 usec per loop
python.exe -m timeit "sum((), 0)" .... 1.22 usec per loop
And for the patched version:
python.exe -m timeit "sum(())" .... 1.46 usec per loop
python.exe -m timeit "sum((), 0)" .... 1.57 usec per loop
However my patch wasn't just the simple argument clinic change suggested by serhiy.storchaka, so maybe that would be more efficient and easier to understand.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31141>
_______________________________________
More information about the Python-bugs-list
mailing list