# [SciPy-dev] Linalg2 benchmarks

Jochen Küpper jochen at unc.edu
Thu Apr 4 20:39:26 CST 2002

```Travis showed really impressive numbers for linal2.  Here is what I
get -- less impressive, still ok?

,----
| >>> scipy.linalg2.basic.test()
| ................................
|            Finding matrix determinant
|       ==================================
|       |    contiguous     |   non-contiguous
| ----------------------------------------------
|  size |  scipy  | Numeric |  scipy  | Numeric
|    20 |   0.35  |   0.75  |   0.35  |   0.87     (secs for 2000 calls)
|   100 |   0.82  |   1.43  |   0.83  |   1.84     (secs for 300 calls)
|   500 |   0.89  |   1.09  |   0.87  |   1.29     (secs for 4 calls)
| .
|       Solving system of linear equations
|       ==================================
|       |    contiguous     |   non-contiguous
| ----------------------------------------------
|  size |  scipy  | Numeric |  scipy  | Numeric
|    20 |   0.53  |   0.65  |   0.53  |   0.77     (secs for 2000 calls)
|   100 |   0.86  |   1.13  |   0.86  |   1.70     (secs for 300 calls)
|   500 |   0.87  |   0.95  |   0.86  |   1.15     (secs for 4 calls)
| .
|            Finding matrix inverse
|       ==================================
|       |    contiguous     |   non-contiguous
| ----------------------------------------------
|  size |  scipy  | Numeric |  scipy  | Numeric
|    20 |   0.76  |   1.24  |   0.76  |   1.35     (secs for 2000 calls)
|   100 |   2.20  |   3.66  |   2.20  |   4.07     (secs for 300 calls)
|   500 |   2.32  |   3.31  |   2.30  |   3.51     (secs for 4 calls)
| .
| ----------------------------------------------------------------------
| Ran 35 tests in 50.385s
|
| OK
`----

These numbers are repeatably the same (+-2 in the 1/100 s).

I don't know what the problem is, but it looks as scipy scales worse
than Numeric?

Interesting to note is also that here Numeric seems to be much faster,
and scale much better, than for Travis -- who has the faster CPU
(1.1GHz Athlon vs. 800MHz PIII)!

This was run on a dual CPU PIII/800, RedHat-7.0 + gcc-3.0.4 + python-2.2.1c1.

ATLAS was compiled with the system kgcc, which is egcs-1.1.2.
scipy is compiled with gcc-3.0.4, compiler options
,----
| -march=i686 -O3 -unroll_loops -fPIC
`----

The machine was busy with a single-thread (single cpu) job, but plenty
of physical RAM was free (about half of 512 MB).

Greetings,
Jochen
--
University of North Carolina                       phone: +1-919-962-4403
Department of Chemistry                            phone: +1-919-962-1579
Venable Hall CB#3290 (Kenan C148)                    fax: +1-919-843-6041
Chapel Hill, NC 27599, USA                            GnuPG key: 44BCCD8E

```