Python compiler ? (was Re: Python for drivers?)
neelk at brick.cswv.com
Sat Apr 29 03:39:37 CEST 2000
Neil Schemenauer <nascheme at enme.ucalgary.ca> wrote:
> I don't think this guy is making native code compilers. The
> "compiled" TkDiff demo is still implemented using Tcl. Unlike my
> grandfather, I can't read German so I can't figure out what his
> "compiler" is supposed to do from the "whitepaper". Babelfish
> does not seem to help.
This sounds more like freeze or GM's installer than a compiler.
I'd guess that places to start if you wanted to try optimizing Python
would be, ordered by increasing sexiness/wizardry, are:
o The Oaklisp implementation. Oaklisp is a fully OO Scheme whose
object system is basically identical to Python's. Its compiler
and runtime would make a good starting point if you wanted
something we mortals could understand. The Squeak Smalltalk
implementation would also be worth looking at (it seems to be
about 3-4 times faster than Python).
o Similix, a partial evaluation program specialization framework
written by a gang of crazy Danes. If you wrote a Python interpreter
in Scheme, you could use Similix to automatically generate
a compiler from it.
o Stalin, Jeffrey Mark Siskind's hyper-optimizing whole-program
Scheme compiler. Basically, you would need to study it, and then
use its techniques to implement a Python compiler. The Self project
would probably also have much of use.
More information about the Python-list