[Numpy-discussion] Unnecessarily bad performance of elementwise operators with Fortran-arrays

David Cournapeau cournape at gmail.com
Thu Nov 8 13:39:37 EST 2007


On Nov 9, 2007 3:28 AM, Christopher Barker <Chris.Barker at 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