pfalcon / python-compiler.old

Python2 compiler package ported to Python3. Compiles Python AST (as produced by the "ast" module) to bytecode assembly and code objects.
https://docs.python.org/2/library/compiler.html
Other
41 stars 3 forks source link

Implement bytecode peephole optimizer pass #2

Open pfalcon opened 5 years ago

pfalcon commented 5 years ago

Currently, comparing results of CPython compilation requires a custom build of CPython3.5 with peephole optimizer disabled. It would be nice to implement peephole optimization pass in python-compiler, to be able to use pristine CPython. (And of course, to allow to experiment with more optimizations in peephole pass.)