Please enlighten me about PyPy
Carl Friedrich Bolz
cfbolz at gmx.de
Thu Dec 22 10:08:04 EST 2005
Hi!
Luis M. González wrote:
> Thanks Carl for your explanation!
> I just have one doubt regarding the way Pypy is supposed to work when
> its finished:
>
> We know that for translating the rpython interpreter to C, the pypy
> team developed a tool that relies heavily on static type inference.
>
> My question is:
> Will this type inference also work when running programs on pypy?
> Is type inference a way to speed up running programs on pypy, or it was
> just a means to translate the Rpython interpreter to C?
>
> In other words:
> Will type inference work on running programs to speed them up, or this
> task is only carried out by psyco-like techniques?
The static type inference is just a means. It will not be used for the
speeding up of running programs. The problem with the current type
inference is that it is really very static and most python programs are
not static enough for it.
Therefore we will rather use techniques that are similar to Psyco (note
that our JIT work is still in the early beginnings and that my comments
reflect only what we currently think might work :-) ). The idea is that
the JIT looks at the running code and assumes some things it finds there
to be constant (like the type of a variable), inserts a check that this
still holds, and then optimizes the code under this assumption.
Cheers,
Carl Friedrich
More information about the Python-list
mailing list