[issue4264] Patch: optimize code to use LIST_APPEND instead of calling list.append
report at bugs.python.org
Fri Nov 7 18:25:29 CET 2008
David Turner <novalis at novalis.org> added the comment:
> Obviously if there's another sufficiently good argument for the visitor
> approach, I'm all ears. But again, if we do that I think we should do
> it for the compiler as well. I'm not sure how much support such a
> change would have.
The argument is that it would be possible to enable or disable
individual optimizations this way. For the compiler, there's no need
for this, because there's only one thing to do per node type (although I
suppose we could just pass that set of things into the node walker).
Another argument against is that it would be harder to combine
optimizations when that's relevant.
I don't think it's worth worrying about until there are a dozen or so
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list