2012/8/14 Kristján Valur Jónsson <krist...@ccpgames.com>: >> I moved the script to a new dedicated project on Bitbucket: >> https://bitbucket.org/haypo/astoptimizer >> >> Join the project if you want to help me to build a better optimizer! >> >> It now works on Python 2.5-3.3. > > I had the idea (perhaps not an original one) that peephole optimization would > be much better > done in python than in C. The C code is clunky and unwieldly, wheras python > would be much > better suited, being able to use nifty regexes and the like. > > The problem is, there exists only bytecode disassembler, no corresponding > assembler.
Why would you like to work on bytecode instead of AST? The AST contains much more information, you can implement better optimizations in AST. AST is also more convinient than bytecode. Victor _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com