[Numpy-discussion] python numpy code many times slower than c++

Ravi lists_ravi@lavabit....
Wed Jan 21 10:30:03 CST 2009


On Wednesday 21 January 2009 10:22:36 Neal Becker wrote:
> > [http://mail.python.org/pipermail/cplusplus-sig/2008-October/013825.html
>
> Thanks for reminding me about this!
>
> Do you have a current version of the code?  I grabbed the files from the
> above message, but I see some additional subsequent messages with more
> patches.

That is the latest publicly posted code. Since then, there is just one minor 
patch (attached) which enables use of row-major (c-contiguous) arrays.

This does *not* work with strided arrays which would be a fair bit of effort 
to support. Further, you will have to work with the numpy iterator interface, 
which, while well-designed, is a great illustration of the effort required to 
support OO programming in an non-OO language, and is pretty tedious to map to 
the ublas storage iterator interface. If you do implement it, I would very 
much like to take a look at it.

Regards,
Ravi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_column_major.patch
Type: text/x-patch
Size: 5446 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/numpy-discussion/attachments/20090121/111930bb/attachment.bin 


More information about the Numpy-discussion mailing list