[pypy-dev] RPython: write generic native library / write CPython C module

Carl Friedrich Bolz cfbolz at gmx.de
Mon Jun 17 11:38:35 CEST 2013


On 06/16/2013 01:37 PM, Albert Zeyer wrote:
> Hi Armin,
>
> Well, not quite. I think I know about the limitations and restrictions
> of RPython. But that is why I think it is especially useful in some
> cases where I have written some library in Python with some strict
> subset of Python (or already mostly RPython). I need a native version
> of the same library and don't really see the point in translating it
> 1:1 to C by hand.

One of the reasons why the RPython project does not care much about
this use case anymore is that we *had* a way to make CPython
extensions. It was called the "extension compiler". It turned out to be
a) extremely annoying to implement b) not very useful in practice. Thus
a totally frustrating experience overall.

The reasons for slowness was mainly: when compiling RPython code to be
a C extension module, reference counting is used to reclaim garbage.
That is extremely slow. Therefore the modules never got the performance
anybody expected.

Cheers,

Carl Friedrich


More information about the pypy-dev mailing list