This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: gsl_multifit



Hi again,

I used Matlab to compute the solution to a least squares problem
with the same sizes as you have and got the following results

> system with Athlon 1GHz, 640MB running Linux-2.4.10

> Order:  (300,200)  (600,400)  (900,600) (1200,1000) (1500,1200)
> Octave:  0.340s     3.320s     11.580s    1m9.680s    2m1.090s
> gsl(QR): 0.390s     4.560s     22.690s    1m38.640s   5m1.580s

system Athlon 700MHz 256Mbytes running win2000
Matlab5.3: 0.1500s    1.342s      4.417s      15.873s    28.362s
(with the LAPACK patch)

If speed is what you want I should use LAPACK directly 
(see www.netlib.org/clapack/ use the LAPACK routine DGELS) with a 
optimized BLAS (see www.netlib.org/atlas) There has been a *lot* 
of effort in writing LAPACK and BLAS routines, they are highly 
optimized to use the cache in a good way (use block methods e.t.c.). 

It is very easy to write for example a matrix multiplication routine, 
it's really hard to get it efficient. Look at this page to see the
speedup they obtained in Matlab when they changed from LINPACK 
(older linear algebra package) to LAPACK and used an optimized BLAS.

http://www.mathworks.com/company/newsletter/clevescorner/winter2000.cleve.sh
tml


Sincerely,
/Mikael Adlers



------------------------------------------------------------------ 
 Mikael Adlers, Ph.D.          email: mikael@mathcore.com 
 MathCore AB                   phone: +4613 32 85 07 
 Wallenbergsgata 4             fax:         21 27 01
 SE-583 35 Linköping, Sweden   http://www.mathcore.com



> -----Original Message-----
> From: Kai Trukenmueller [mailto:trukenm@ag2.mechanik.tu-darmstadt.de] 
> Sent: den 18 oktober 2001 18:21
> To: gsl-discuss@sources.redhat.com
> Subject: Re: gsl_multifit
> 
> 
> Hi,
> 
> > You could try computing the solution using the following
> > functions instead and see if you get any speed improvement.
> > gsl_linalg_QR_decomp
> > gsl_linalg_QR_lssolve
> Thanks for the tip. It's much faster now, but still slower 
> than octave.
> 
> Order:	(300,200)  (600,400)  (900,600)  (1200,1000)  
> (1500,1200)
> Octave:  0.340s     3.320s     11.580s    1m9.680s    2m1.090s
> gsl(QR): 0.390s     4.560s     22.690s    1m38.640s   5m1.580s
> -- 
> :wq `Kai Trukenmueller'
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]