[Numpy-discussion] Matlab/Numeric/numarray benchmarks

Todd Miller jmiller at stsci.edu
Wed Jan 5 06:11:31 CST 2005


Hi Simon,

I found a benchmark bug which explains the performance difference in +. 
Here are my times with the modified benchmark (Python-2.4 gcc version
3.2.2 20030222 (Red Hat Linux 3.2.2-5) on 1.7 GHz P-IV w/ 2G):

numarray + : 0.0540893316269
numarray matrixmultiply : 16.9448821545
numarray eigenvalues : 9.67254910469

Numeric + : 0.0653991508484
Numeric matrixmultiply : 33.0565470934
Numeric eigenvalues : 9.44225819111

So, for large arrays with a simple to install / built-in linear algebra
system,  numarray is doing just fine.  

Looking at your results,  I think you may have been comparing numarray
built using a built-in blas_lite versus Numeric using ATLAS.  There,  I
think numarray *is* behind but that is fixable with some effort.  The
key is porting and integrating the Numeric dotblas package with
numarray.  I've been looking at that some today...  err, yesterday,
apparently I forgot to hit "send".

On Mon, 2005-01-03 at 17:41, Simon Burton wrote:
> Hi all,
> 
> Here are some benchmarks, measured in seconds on a 1.5GHz celeron.
> Each test does a matrix add (1000x1000), mul (1000x1000) and eigenvalue 
> find (500x500).
> 
> Matlab:
> 0.0562
> 1.5180
> 3.7630
> 
> Numeric:
> 0.0962309813499
> 1.73247330189
> 3.72153270245
> 
> numarray:
> 7.17220497131
> 19.3960719109
> 5.72376401424
> 

> I understand that Todd is working on scipy/numarray compatability. How 
> is that progressing, and what should we be doing to get the above 
> functionality into numarray ?

Perry already addressed this.

>  I have been pokeing around the code 
> already, and am able to help out with that.


Regards,
Todd


-------------- next part --------------
A non-text attachment was scrubbed...
Name: benchmark.py
Type: text/x-python
Size: 2055 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/numpy-discussion/attachments/20050105/2e849f55/attachment.py 


More information about the Numpy-discussion mailing list