[Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)
Dag Sverre Seljebotn
Fri Apr 20 13:39:57 CDT 2012
On 04/20/2012 08:35 PM, Fernando Perez wrote:
> On Fri, Apr 20, 2012 at 11:27 AM, Dag Sverre Seljebotn
> <email@example.com> wrote:
>> I don't think you gain that much by using a different type though? Those optimized code paths could be plugged into NumPy as well.
> Could be: this was years ago, and the bottleneck for me was in the
> constructor and in basic arithmetic. I had to make millions of these
> vectors and I needed to do basic arithmetic, but they were always 1-d
> and had one to 6 entries only. So writing a very static constructor
> with very low overhead did make a huge difference in that project.
Oh, right. I was thinking "small" as in "fits in L2 cache", not small as
in a few dozen entries. You definitely still need a Cython class then.
> Also, when I wrote this code numpy didn't exist, I was using Numeric.
> Perhaps the same results could be obtained in numpy itself with
> judicious coding, I don't know. But in that project, ~600 lines of
> really easy pyrex code (it would be cython today) made a *huge*
> performance difference for me.
More information about the NumPy-Discussion