[issue27129] Wordcode, part 2

Mark Shannon report at bugs.python.org
Mon Mar 29 11:03:37 EDT 2021


Mark Shannon <mark at hotpy.org> added the comment:

frame.f_lasti and traceback.tb_lasti are best left as byte offsets.
There is no guarantee that we won't go back to variable length instructions.
For example, a "LONG_JUMP" instruction which is 4 bytes long and takes a 3 byte offset might well be a worthwhile extension.

However, changing bytecode offsets and the internal representation of frame.f_lasti will reduce the number of "EXTENDED_ARG"s by 60% or more and makes interpreter dispatch a tad more efficient.

----------

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


More information about the Python-bugs-list mailing list