[Python-ideas] ctypes and extensions
Stefan Behnel
stefan_ml at behnel.de
Sun Aug 28 20:34:11 CEST 2011
Jeremy Sanders, 28.08.2011 12:35:
> Maybe there are cython implementations coming soon available for pypy,
> jython, ironpython, etc...?
There are ports to PyPy and IronPython being written, yes. Not sure if a
Jython port would be all that competitive, because there is quite some
overhead involved in the JNI bridge (AFAIR - this may have changed since
the last time I considered it). But it would still be interesting for many
projects even with a noticeable performance penalty, I guess.
> These would still have to compile to C code to
> get build time API checking, which is one of the ctypes issues.
Well, the PyPy port actually uses ctypes as a backend for C interaction, so
it's not really PyPy specific, but it's supposed to work particularly well
on PyPy.
The IronPython port uses a mixture of C++ and CLR code, but I haven't been
involved with it in any way. It was written to port NumPy to .NET, and that
reportedly worked out quite well.
Stefan
More information about the Python-ideas
mailing list