[issue42147] Micro optimization for longrange iteration if step is 1

Inada Naoki report at bugs.python.org
Sun Oct 25 21:30:20 EDT 2020


Inada Naoki <songofacandy at gmail.com> added the comment:

I agree that 1<<1000 is artificial example. But isn't this patch affects more regular patterns like [[] for _ in range(10000)]?

If we reject this, shouldn't we revert GH-22479 too?
I believe iterating range object is much more common use  case than range.index.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42147>
_______________________________________


More information about the Python-bugs-list mailing list