In numpybook, in discussing iterators, it says that if you know your array is contiguous, it may be faster to just use C-style pointers instead of iterators.
Looking at the code a little, it appears that PyArray_ITER_NEXT(it) attempts to optimize for certain cases. I wonder if anyone has done any benchmarks on modern compilers? In particular, I'm hoping that PyArray_ITER_NEXT on a modern compiler will optimize the contiguous case to give equivalent performance to a c-style pointer. In that case, I could happily use the generic iterator without a speed penalty. _______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
