Differences in Matlab/Octave processing time
David Bateman
adb014 at gmail.com
Fri May 30 10:48:45 CDT 2008
HempyElmo wrote:
> Hi,
>
> 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.
>
> Thanks!
"loops" you say.... You answered your own question, Octave doesn't yet
have a JIT though I expect that will change soonish, so loops are slow.
Till then read
http://www.mathworks.com/support/tech-notes/1100/1109.html
which equally (or probably even more so than matlab) applies to Octave,
and vectorize your code.
D.
More information about the Help-octave
mailing list