Differences in Matlab/Octave processing time

Francesco Potorti` Potorti at isti.cnr.it
Fri May 30 10:08:55 CDT 2008


>I've got a Matlab code which I want to run on Octave. With Matlab this
>program takes about 5 minutes under Windows XP on a Intel Pentium 4 2.4 GHz
>to make an output .mat. With Octave on the same computer, it took ages...
>maybe 30 times more processing time. Same thing happens for Octave with the
>same version (2.9.15) on a Linux machine (Intel Xeon 2.8 GHz). Is anybody
>have a reason why? Is it because of Octave or the code itself?
>
>The code reproduce a particle in cells simulation. I don't know how many
>loops it makes.

Probably too many.  Try to vectorise the code so to make it more
efficient.  Octave is not as good as Matlab to run non vectorised code,
as it does not have a jit compiler built in, so loops are slower.

-- 
Francesco Potortì (ricercatore)        Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR          Fax:   +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa         Email: Potorti at isti.cnr.it
(entrance 20, 1st floor, room C71)     Web:   http://fly.isti.cnr.it/


More information about the Help-octave mailing list