[pypy-dev] offtopic, ontopic, ...

Stefan Behnel stefan_ml at behnel.de
Tue Feb 14 13:40:17 CET 2012


Armin Rigo, 14.02.2012 13:18:
> On Tue, Feb 14, 2012 at 13:13, Armin Rigo wrote:
>> For this reason, I remain convinced that the best approach for Cython
>> on PyPy is instead to have Cython generate pure Python code that would
>> use some API in the form of a built-in Python module.
> 
> For what it's worth, it would work if the Cython sources (or even the
> C intermediate sources) were "compiled" into any custom bytecode, not
> necessarily Python's.  We would then write a simple interpreter for it
> in RPython, which looks kind of easy.  It may seem strange, but it's
> actually similar to regular expressions.
> 
> As a rather extreme solution: I wonder how useful it would be to use
> gcc to cross-compile the C intermediate sources to MIPS assembler, and
> write a MIPS interpreter in RPython...  (MIPS because it's apparently
> a very simple instruction set)

I can't see how this approach would solve the problem, at least not how
it's better than anything else.

1) assembly is an extremely low level interface that looses tons of code
semantics, which makes it hard to run such code efficiently

2) it doesn't take away the need for C-API interaction, which means that
this API still needs to be implemented completely, in one way or another

Stefan



More information about the pypy-dev mailing list