Does the world need another v0.1 python compiler?

Kay Schluehr kay.schluehr at gmx.net
Thu Feb 8 02:03:35 EST 2007


On 8 Feb., 17:00, John Nagle <n... at animats.com> wrote:
> Grant Olson wrote:
> > The basic approach I took was compiling to bytecode, and then
> > transliterating python bytecode to x86 asm.  And it is working a little bit.
>
>      An interesting option might be to generate the byte code used by
> the SpiderMonkey engine in Mozilla.  That's used to handle both
> Javascript in Firefox and ActionScript in Flash.  It has a just-in-time
> compiler, so you get x86 machine code when you need it.
> And the run time engine is tiny; there's a copy inside Flash, which is
> only 2MB.
>
>      That could be a way to get a faster Python without bringing excess
> baggage.
>
>                                 John Nagle

This code generation for an arbitrary backend sounds more like an
appropriate task for PyPy. I think Grant's or anyone elses compiler
could be a viable tool for augmenting the CPython interpreter in
particular in the presence of optional type annotations in Py3K.




More information about the Python-list mailing list