[Python-Dev] Re: native code compiler? (or, OCaml vs. Python)

Tim Peters tim.one@comcast.net
Thu, 30 Jan 2003 19:36:22 -0500

[Graham Guttocks]
> I see. Again, I didn't realize the enormity of this, because
> of how fast Psycho has progressed (from a part-time volunteer).

Not any part-time volunteer.  Armin did Psycho while finishing his doctoral
dissertation, and applied a brain the size of a planet to the job, with
passion.  That's the way intriguing compilers for dynamic languages get
written in the absence of realistic funding (Dan notwithstanding <wink>).
For a recent idea of what "realistic funding" means, dig thru now-old but
not-yet-ancient stories about Sun's efforts on Java JIT technology.

Of course everyone's an expert on everything they don't do, so it's natural
to assume it's just a lack of will, or foresight, or something.

Since O'Caml is in the Subject line here, note that one person reimplemented
Python in O'Caml, with the goal of running much faster than CPython:


They gave up some time ago, with the last word on the topic there being:

    The interpreter Pystone benchmark is currently about 10 times slower
    than CPython 1.5.2.  Considerable improvement is expected in the

At least CPython (what we call the C implementation of Python) has gotten
faster since then, but I'm not sure that's the considerable improvement the
author had in mind <wink>.

> You might consider adding the above to the FAQ to make it more
> clear that it is theoretically possible, but not without an
> enormous amount of work and/or funding.

The question doesn't upset me, but I prefer to limit the FAQ to frequently
asked questions.