[issue2181] optimize out local variables at end of function
Neal Norwitz
report at bugs.python.org
Mon Feb 25 03:03:09 CET 2008
Neal Norwitz added the comment:
I forgot to mention that if another loop was added to PyCode_Optimize
that kept track of the # of times each local variable was
LOAD_FAST/STORE_FAST/DELETE_FAST and that the count was 2, we could
perform a similar optimization without requiring the return.
Bonus points for other cases like if it was the last use inside a list
comprehension or the variable is otherwise unaccessible.
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2181>
__________________________________
More information about the Python-bugs-list
mailing list