This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eltoder
Recipients eltoder, mark.dickinson, pitrou, rhettinger
Date 2011-03-11.17:32:15
SpamBayes Score 8.82018e-08
Marked as misclassified No
Message-id <>
> Right now, the pattern is tokenize -> parse -> AST -> genbytecode ->
> peephole optimization (which disassembles the bytecode, analyzed it
> and rewrites it) -> final bytecode.   The correct pattern is tokenize
> -> parse -> AST -> optimize -> genbytecode -> peephole optimization
> with minimal disassembly, analysis, and opcode rewrites -> final bytecode.

Actually, optimizing on AST is not ideal too. Ideally you should convert it into a specialized IR, preferably in SSA form and with explicit control flow.

Re size saving: I've ran make test with and without my patch and measured total size of all generated pyc files:
without patch: 16_619_340
with patch: 16_467_867
So it's about 150KB or 1% of the size, not just a few bytes.
Date User Action Args
2011-03-11 17:32:17eltodersetrecipients: + eltoder, rhettinger, mark.dickinson, pitrou
2011-03-11 17:32:17eltodersetmessageid: <>
2011-03-11 17:32:15eltoderlinkissue11462 messages
2011-03-11 17:32:15eltodercreate