[SciPy-user] some benchmark data for numarray, Numeric and scipy-newcore

Travis Oliphant oliphant.travis at ieee.org
Sat Dec 3 16:57:06 CST 2005

Chris Fonnesbeck wrote:

>On 12/3/05, Gerard Vermeulen <gerard.vermeulen at grenoble.cnrs.fr> wrote:
>>- the overal performance of numarray is 23 % better than scipy-newcore and
>>  27 % better than Numeric.
>>- numarray is consistently faster than the other packages.
>>- scipy newcore is on average somewhat faster than Numeric3, but some operations
>>  are really slow in comparison with the other packages. In partical the
>>  statements labeled 2, 3, 4, 6 and 7 take 2 times more time using scipy-newcore
>>  than using Numeric.
>These results seem a little shocking to me. Has numarray made recent
>strides? As recent as a month ago, numarray was a dog, running orders
>of magnitude slower for almost everything, unless arrays were *huge*.
>What is up?
I think that numarray is still faster for very large arrays in certain 
circumstances (I have test cases that show that scipy core is faster in 
basic operations).   For small arrays, numarray is still slow.  Based on 
what I've seen of your code, you use a lot of small arrays.  Scipy core 
is still slower than Numeric on very small arrays too because of the 
increased ufunc overhead accompanying the added features.  I'm hoping 
that some of this slowness will be alleviated once we give array scalars 
their own faster math (right now, array scalars go through the entire 
ufunc machinery for math --- definitely slower than what is possible). 

I would like to figure out if there are things Numarray is doing for 
ufuncs on large arrays, that scipy core is not doing.   I would also 
like to figure out how numarray does such a quick arange (if the number 
shown in the benchmark is accurate).

Benchmarks can be useful (because I'd like to get rid of unnecessary 
speed bumps in scipy which may still exist) but given the complexity of 
these code bases and the many paths through them, they can rarely be 
used as "X" is (always) faster than "Y".

Best regards,


More information about the SciPy-user mailing list