help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I'll try again: oct and arrays


From: Martin Helm
Subject: Re: I'll try again: oct and arrays
Date: Thu, 30 Dec 2010 14:14:43 +0100
User-agent: KMail/1.13.5 (Linux/2.6.34.7-0.5-desktop; KDE/4.5.4; x86_64; ; )

Am Donnerstag, 30. Dezember 2010, 12:52:21 schrieb Jesper Schmidt Hansen:
> 
> I have tried to use fortran_vec() as Martin and Søren suggested: this
> gives a speed-up of two compared to using the ()-operator, but is
> still slower than the corresponding MEX file.  On the current machine
> I get (different from the one I used in the original question), the
> numbers in parenthesis denote the standard deviation
> 
> OCT using (): 0.0362 (0.0006)
> OCT using fortran_vec(): 0.0143 (0.0006)
> MEX : 0.0078 (0.0005)
> 
> Jesper

Just out of curiousity, did you also try how it scales when you make your 
problem larger with the Gauss-Seidel?
I have tested your original example with () and fortran_vec and with a 
1000x1000 matrix I had a speedup for the latter by about a factor 2 but for 
10000x10000 by a factor about 10 (i repeated every calculation 10 times to 
avoid measuring some startup effect).
So it looks to me that there is some (constant?) overhead in using the oct file 
which leverages when the size of the problem/raw computing time  grows.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]