first release of PyPy

John Roth newsgroups at jhrothjr.com
Sat May 21 08:46:37 EDT 2005


"Torsten Bronger" <bronger at physik.rwth-aachen.de> wrote in message 
news:87is1dyru8.fsf at wilson.rwth-aachen.de...
> Hallöchen!
>
> Paul Rubin <http://phr.cx@NOSPAM.invalid> writes:
>
>> Torsten Bronger <bronger at physik.rwth-aachen.de> writes:
>>
>>> Please could somebody explain to us non-CS people why PyPy could
>>> have speed features CPython can't have?
>>
>> Does the one-word answer "compiler" explain enough?
>
> No, just more questions.  ;-)
>
> What's supposed to be compiled?  Only PyPy itself or also the
> programs it's "interpreting"?

To be more specific, the (possible) speed increase will come
from JIT (Just In Time) compilation technology. JIT technology
is quite capable of handling dynamic languages. That has to
come after they get a compilable interpreter working, but I
believe it was in the original project vision statement.

A JIT compiler within the interpreter will put PyPy pretty
much on a par with Java as far as speed goes.

> <http://www.python.org/pycon/dc2004/papers/27/>: "In the next step
>    of the project, we will generate C code or machine code from the
>    source of Pypy, thereby reducing the speed penalty."
>
> I've been told by so many books and on-line material that Python
> cannot be compiled (unless you cheat).  So how is this possible?

JIT compilers cheat. Specifically, they compile for the observed
object environment of a statement, and then insert a test to make
sure that the actual environment matches the expected environment.
If it doesn't, it goes back to interpretation for that code segment.

John Roth
>
> Tschö,
> Torsten.
>
> -- 
> Torsten Bronger, aquisgrana, europa vetus 




More information about the Python-list mailing list