[Python.NET] [python] Re: Experimental C Extensions from IronPython with Python.NET - code and article
lists at cheimes.de
Thu Oct 25 11:11:28 CEST 2007
Michael Foord wrote:
> Hey - well if someone uses it I might actually maintain it... :-)
> For passing lots of data in and out it will probably be highly
> inefficient, but let me know about your experiences with it.
> In the long run Resolver aims to solve exactly this problem though, as
> we have customers who also want to use Numpy.
We might be able to resolve the problem and make it more efficient. I'm
not sure if it will actually work and my C+/.NET knowledge is too
limited to implement it on my own.
Python 2.x has something called buffer()
(http://docs.python.org/api/abstract-buffer.html). It's designed for
quick memory access of Python objects. IIRC numpy is supporting the
buffer protocol, too. It *might* be possible to use the buffer protocol
to exchange data between CPython and IronPython by using unsafe code.
PythonDotNet uses unsafe code and direct access to memory all the time
to make it efficient.
I don't think it's possible to write unsafe and unmanaged code with
IronPython but with C# one could write some nice and hacky pointer
More information about the PythonDotNet