[New-bugs-announce] [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.
Mark Shannon
report at bugs.python.org
Mon Apr 1 18:31:20 CEST 2013
New submission from Mark Shannon:
The handling of "pseudo exceptions" (return, break and continue) are currently handled in the interpreter. This make the interpreter loop more complex and slower than it needs to be. This change moves the handling of pseudo exceptions into the compiler.
The net effects of this patch are:
Simpler interpreter loop: no 'psuedo-exceptions', fewer bytecodes and some simplifed bytecodes.
Eliminate the 'why_code' state variable in the interpreter. Execution is always in the 'normal' state except during explicit exception handling.
Small increase in size and complexity of compiler.
Speedup of 1.5% (Intel i7); this should be considered a happy side-effect rather than a motivation for the change.
----------
hgrepos: 181
messages: 185741
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17611>
_______________________________________
More information about the New-bugs-announce
mailing list