A faster Python?, Python compiler, Dylan,...

Patrick Miller patmiller at llnl.gov
Wed Apr 10 11:51:17 EDT 2002


Chris writes:
> "Greg Ewing" <greg at cosc.canterbury.ac.nz> wrote in message
> > I'm not sure that Pyrex will ever compile *all* valid Python
...
> It could be interesting to see how far you could get with just the subset
> you do compile, though. The Squeak people can compile their entire VM from
...
> So, you don't need to compile all of Python syntax to have a very
> interesting project on your hands.

With the SciPy weave.accelerate project, we're trying
two schemes to keep the whole language in play...

1) keep a pretty general reverse API (Python describing
a type's C/C++ API) which can include a generic PyObject*
type.  Then if w.a can't find an accelerated type description
it can still strip off some of the more expensive parts
of the interpretation (e.g. lower loop overhead, 
cut some of the function call cost, faster attribute
fetching, etc...)

2) Fall back to simply executing the original Python.  This
can mean that we can eventually write Python in Python
where some of the bits will compile down to C/C++ and
other more dynamic parts just don't.

My goal is to get down to a really slim compiled core that allows
much of the language to be implemented directly in Python.
This has big ramifications for Jython and Pippy.

Pat


-- 
Patrick Miller | (925) 423-0309 | patmiller at llnl.gov

Son, when you grow up you will know who I really am.
I am just a child like you who has been forced to act
responsibly.  -- Rod Byrnes





More information about the Python-list mailing list