[Numpy-discussion] Unnecessarily bad performance of elementwise operators with Fortran-arrays
David Cournapeau
cournape@gmail....
Thu Nov 8 12:39:37 CST 2007
On Nov 9, 2007 3:28 AM, Christopher Barker <Chris.Barker@noaa.gov> wrote:
> This discussion makes me wonder if the basic element-wise operations
> could (should?) be special cased for contiguous arrays, reducing them to
> simple pointer incrementing from the start to the finish of the data
> block.
I don't see why it could not. I think that most of the implementation
could be common to most functions, because they share a lot (handling
out argument, axis argument, and sometimes dtype argument). The only
different part would be the actual compuation by a C function, which
is trivial as you pointed.
cheers,
David
More information about the Numpy-discussion
mailing list