[issue40974] possible optimization: SHRINK_STACK(n)

Pablo Galindo Salgado report at bugs.python.org
Sun Jun 14 13:23:52 EDT 2020


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

> less opcodes = faster evaluation

Unfortunately, that is not always true as opcodes can have arbitrary complexity and there are very low-level effects that are relevant in the eval loop. Even if it is better, the improvement may not be worth burning another opcode, especially since the new opcode won't replace POP_TOP (so we need to deal with both).

Without evaluating the tradeoffs and how it plays into the current status quo I have some initial questions:

- What is the performance improvement of the patch that you propose? Could you run the pyperformance benchmark suite to have some numbers? 

- How many opcodes less are we talking about? What is the size before and after the suggested change in the stdlib pyc files?

----------

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


More information about the Python-bugs-list mailing list