[issue28800] Add RETURN_NONE bytecode instruction

STINNER Victor report at bugs.python.org
Fri Nov 25 09:08:21 EST 2016


STINNER Victor added the comment:

> Do you want to add RETURN_NONE or RETURN_CONST? Or both?

Only RETURN_NONE because on some corner cases it allow to avoid completely the None constant from code.co_consts and reduce the stack size.

I'm not sure that I want to start taking the same road of WPython which added a *lot* of specialized instructions (combining two or more existing instructions). As you said, it has a cost on the maintenance, and might have a negative impact if _PyEval_EvalFrameDefault() becomes too big.

----------

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


More information about the Python-bugs-list mailing list