first release of PyPy

Christian Tismer tismer at stackless.com
Sat May 21 20:47:23 EDT 2005


Ville Vainio wrote:

>>>>>>"Torsten" == Torsten Bronger <bronger at physik.rwth-aachen.de> writes:
> 
> 
>     Torsten> What's supposed to be compiled?  Only PyPy itself or also
>     Torsten> the programs it's "interpreting"?
> 
> PyPy is written in python, if it can be compiled then the programs can
> be as well.

Well, this is not really true. PyPy is written in RPython,
a sub-language of Python that is implicitly defined by
"simple and static enough to be compilable".

We have not yet started to work on the dynamic nature of
Python, that needs different technology (Psyco).

>     Torsten> I've been told by so many books and on-line material that
>     Torsten> Python cannot be compiled (unless you cheat).  So how is
>     Torsten> this possible?
> 
> These guys are exploring a new territory. OTOH, Lisp is a dynamic
> language like python and it can be compiled to native code. Pyrex
> demonstrates the "trivial" way to compile python to native code, the
> real problem is making the resulting code fast. Typically this
> requires type inference (i.e. figuring out the type of an object from
> the context because there are no type declarations) to avoid dict
> lookups in method dispatch.

Type inference works fine for our implementation of Python,
but it is in fact very limited for full-blown Python programs.
Yoou cannot do much more than to try to generate effective code
for the current situation that you see. But that's most often
quite fine.

-- 
Christian Tismer             :^)   <mailto:tismer at stackless.com>
tismerysoft GmbH             :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9A     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 802 86 56  mobile +49 173 24 18 776  fax +49 30 80 90 57 05
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/



More information about the Python-list mailing list