Serhiy Storchaka added the comment:

What if generate following code?

    GET_ITER
    JUMP_FORWARD L2
L1:
    # ...
L2:
    FOR_ITER L1

This saves one jump instruction per iteration.

Next, we can merge GET_ITER+JUMP_FORWARD in one FOR_BEGIN instruction for 
regular loops. Generators will start with JUMP_FORWARD.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27127>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to