Raymond Hettinger <[EMAIL PROTECTED]> added the comment: It would be helpful if we talked before going further on build-outs to the peephole optimizer. IIRC, we chose to not do this one because it interfered with other more important optimizations.
More importantly, we decided that the peepholer is the wrong place to do much of this work. Most of the peepholer is going to be migrated up the chain, after the AST is generated, but before the opcodes are generated. That is a faster, more reliable, and more general approach. The constant folding anti-duplication patch should also not be done for this same reason. That patch slows down compilation and makes it more fragile but does not add speed (just like the dead code elimination patches). When the peepholer is moved-up, the anti- duplication code won't be needed (as you won't need its attendant rescan/rewrite pass of the bytecode). You're writing these faster than I have time to review and likely reject them. Please show some moderation. The peepholer is intentionally very conservative. ---------- nosy: +rhettinger __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2499> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com