[issue24076] sum() several times slower on Python 3

Mark Dickinson report at bugs.python.org
Thu Apr 30 05:50:27 CEST 2015


Mark Dickinson added the comment:

Łukasz: there are three ingredients here - sum, (x)range and the integer addition that sum will be performing at each iteration.  Is there any chance you can separate the effects on your machine?

On my machine (OS X, 64-bit), I'm seeing *some* speed difference in the integer arithmetic, but not enough to explain the whole of the timing mismatch.

One thing we've lost in Python 3 is the fast path for small-int addition *inside* the ceval loop.  It may be possible to restore something there.

----------
nosy: +mark.dickinson

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


More information about the Python-bugs-list mailing list