[Numpy-discussion] How fast are small arrays currently?

Todd Miller jmiller at stsci.edu
Wed Jan 21 13:21:05 CST 2004


> > Why are numarrays so slow to create?
> > 
There are several portable ways to create numarrays (array(), arange(),
zeros(), ones()) and I'm not really sure which one to address, so I
poked around some.  

I discovered that numarray-0.8 has a problem with array() which causes
very poor performance (~30x slower than Numeric) for arrays created from
a sequence.  The problem is with a private Python function,
_all_arrays(), that scans the sequence to see if it consists only of
arrays;  _all_arrays() works badly for the ordinary case of a sequence
of numbers.  This is fixed now in CVS.

Beyond this flaw in array(),  it's a mixed bag,  with numarray tending
to do well with large arrays and certain use cases, and Numeric doing
well with small arrays and other use cases.

Todd

> I'll leave it to Todd to give the details of that.
> 
> 
> 
> 
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion
-- 
Todd Miller 			
Space Telescope Science Institute
3700 San Martin Drive
Baltimore MD, 21030
(410) 338 - 4576





More information about the Numpy-discussion mailing list