[SciPy-dev] Linalg2 benchmarks

Travis Oliphant oliphant.travis at ieee.org
Fri Apr 5 00:13:05 EST 2002


>
> The other question is are you using ATLAS for Numeric as well?  How was
> your Numeric installed.    Which version of Numeric do you have?
>
> Those numbers mean your Numeric must be using a more optimized version of
> lapack, anyway.


For example.  Here is the comparison when I link Numeric against ATLAS -- not 
the default install configuration (if you install binaries you might be 
getting an optimized Numeric).

>>> import scipy.linalg2
>>> scipy.linalg2.basic.test()
................................
           Finding matrix determinant
      ==================================
      |    contiguous     |   non-contiguous
----------------------------------------------
 size |  scipy  | Numeric |  scipy  | Numeric
   20 |   0.25  |   0.49  |   0.24  |   0.56     (secs for 2000 calls)
  100 |   0.40  |   0.78  |   0.39  |   1.05     (secs for 300 calls)
  500 |   0.46  |   0.62  |   0.46  |   0.78     (secs for 4 calls)
.
      Solving system of linear equations
      ==================================
      |    contiguous     |   non-contiguous
----------------------------------------------
 size |  scipy  | Numeric |  scipy  | Numeric
   20 |   0.39  |   0.43  |   0.38  |   0.49     (secs for 2000 calls)
  100 |   0.44  |   0.62  |   0.44  |   0.98     (secs for 300 calls)
  500 |   0.46  |   0.53  |   0.46  |   0.69     (secs for 4 calls)
.
           Finding matrix inverse
      ==================================
      |    contiguous     |   non-contiguous
----------------------------------------------
 size |  scipy  | Numeric |  scipy  | Numeric
   20 |   0.51  |   0.74  |   0.50  |   0.80     (secs for 2000 calls)
  100 |   1.08  |   1.92  |   1.09  |   2.28     (secs for 300 calls)
  500 |   1.24  |   1.65  |   1.24  |   1.81     (secs for 4 calls)
.
----------------------------------------------------------------------
Ran 35 tests in 27.988s

OK



The speed up isn't nearly so impressive as before and I also see the relative 
improvement of Numeric in going from 100 to 500 size matrices over scipy's 
modest decrease (SciPy's f2py-optimized interface is still faster though) --- 
nearly twice as fast for small matrices.

-Travis



More information about the SciPy-Dev mailing list