On 08/14/2012 03:32 PM, Victor Stinner wrote: >> 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 AST allows for better high-level optimizations, but a real peephole optimization pass is actually designed to optimize generated code. This allows eliminating some inefficiencies which would be fairly hard to prevent at higher levels - wikipedia provides some examples.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4