On Wed, Jul 14, 2010 at 6:59 PM, Robert Bradshaw <[email protected]> wrote: >> In my experience, I always have to resort to Fortran or C++. Cython cannot >> use NumPy arrays efficiently as function arguments. That is a big show >> stopper. > > Could you clarify? I suppose for very small arrays, there's the extra > O(1) type-check/stride extraction overhead. Is there anything else? Of > course there's always more room for improvement for the array type.
Sometimes I write functions that don't iterate over every element of their argument arrays :) In particular, I remember that when I was writing sage/plot/plot3d/implicit_surface.pyx, I wanted to make several chunks of code into methods but decided not to for efficiency reasons. (I'm not sure if I actually measured, or if I was just worried.) If I was doing it again, I think I'd give up on the Cython numpy support and just use C pointers in that code... Carl _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
