Update: [clean-list] Matrix timings

Siegfried Gonzi siegfried.gonzi@kfunigraz.ac.at
Tue, 30 Oct 2001 11:26:35 +0100


Shivkumar Chandrasekaran shiv@ece.ucsb.edu schrieb,

> This timing is way too slow. On my PowerBook G4 (400Mhz) (running Mac OS 
> X), Scilab took 0.31 seconds to solve a system with 300 equations and 
> 300 unknowns. Allowing for a processor that is 4 times slower we would 
> "expect" to solve it in 1.21 seconds on a 100MHz processor. Scilab (on 
> my machine) uses ATLAS BLAS. If we disallow for tuned BLAS 
> (conservatively) we can expect the 100MHz processor to be 16 times 
> slower, yielding an expected running time of 0.31 * 16 = 4.96 seconds.

> In my own timings I found that Clean is typically 2.5 to 5 times (not 
> 1.5 times) slower than equivalent code compiled with gcc. The best 
> performance (2.5 times slower than C) was obtained when I simulated 2D 
> arrays with 1D arrays.


As a postscriptum. I downloaded Scilab for Unix and installed it locally
on my old Sun (I log in to newer and very,very faster ones only for
serious computations).

Solving a random 300x300 array for another 300x300 array takes here 7sec
(I hope I did the Scilab code correct; my last experience with it has
been a few years ago):

t1=timer(); a=rand(300,300); b=rand(300,300); c=a\b; t2=timer(); t1,t2


takes 7sec.

Yorick takes about 8sec (Yorick is Unix native; but I do not know wheter
the lin-alg libraries are tuned or only translated from Fortran to C
with the help of an automatic translater).

Clean takes with *strict* (!) arrays 20sec. I would assume a factor of 2
better for unboxed arrays (#). I tried it also with unboxed array (but I
know it will deliver false resulst; but only due to my curiosity). Then
the Clean version takes about 11sec.

I am not sure whether my Scilab uses some tuned lin-alg packages,
because I only had to make the "make" and not the well know Unix
procedure via ./configure and then make. This means my Scilab is
pre-compiled and I do not know if this is a disatvantage.


But believe me Clean is close to C and the factor of 1.4 has been again
proofed to be reliable (at least here on my Sun).

Benchmarking is black art... But again I would be eagerly to know your
Clean results due to my code on your Macintosh.


S. Gonzi