PyPy and RPython

John Nagle nagle at
Fri Sep 3 08:59:57 CEST 2010

On 9/2/2010 10:30 PM, sarvi wrote:
> On Sep 2, 2:19 pm, John Nagle<na... at>  wrote:
>> On 9/2/2010 1:29 AM, sarvi wrote:
>>> When I think about it these restrictions below seem a very reasonable
>>> tradeoff for performance.
>>      Yes.
>>> And I can use this for just the modules/sections that are performance
>>> critical.
>>      Not quite.  Neither Shed Skin nor RPython let you call from
>> restricted code to unrestricted code.  That tends to happen
>> implicitly as objects are passed around.  It's the global
>> analysis that makes this work; when you call something, you
>> need to know more about it than how to call it.
> It should technically be possible to allow Python to call a module
> written in RPython?

    The problem is that, in a language where everything is an object,
everything you call calls you back.

    The basic performance problem with CPython comes from the fact
that it uses the worst-case code for almost everything.  Avoiding
that requires global analysis to detect the places where the code
clearly isn't doing anything weird and simpler code can be used.
Again, look at Shed Skin, which represents considerable progress
made by one guy. With more resources, that could be a very
good system.

				John Nagle

More information about the Python-list mailing list