Does the world need another v0.1 python compiler?

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Thu Feb 8 13:02:13 EST 2007


sturlamolden:
> IMHO, with the presence of static types in Py3K, we should have a
> static compiler that can be invoked dynamically, just like Common
> Lisp.
> Something like
>
> def foo(...):
> bar = static_compile(foo, optimize=2)
> bar(...)
>
> JIT compilers are hyped, static compilers perform much better. This
> way the programmer can decide what needs to be compiled. This is the
> reason why CMUCL can compete with most C compilers.

Lot of Python code uses Psyco, so maybe it may be better to extend
Psyco to that 'static compilation' functionality too:

def foo(...):
psyco.static_bind(foo)

At the moment I think this approach can't improve much the speed of
Python programs compared to what Psyco is already able to do.
PyPy's RPython and ShedSkin are also to be considered, recently
ShedSkin is going to support some of the usual Python forms of lazy
processing too.

Bye,
bearophile




More information about the Python-list mailing list