[Numpy-discussion] Alternate C-only array protocol for speed?
xscottg at yahoo.com
Fri Apr 8 12:24:02 CDT 2005
--- "David M. Cooke" <cookedm at physics.mcmaster.ca> wrote:
> It seems that people are worried about speed of the attribute-based
> array interface when using small arrays in C.
I'm really not worried about it... I just don't want "performance" to be
used as an argument for a given design decisions when the proposed change
won't actually make things faster.
> Here's an alternative: Define some attribute (for now, call it
This would definitely be faster. Faster yet would be doing a
PyNumeric_Check (or PyNumarray_Check, or whatever they're called) and just
cast the pointer to the underlying representation. If you must go fast, go
as fast as possible...
I'd rather we didn't add a lot complexity to the array protocol to just go
at a medium speed.
More information about the Numpy-discussion