help-octave
[Top][All Lists]
Advanced

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

Octave vs. Matlab speed difference, any suggestions?


From: szabi-11
Subject: Octave vs. Matlab speed difference, any suggestions?
Date: Thu, 6 Aug 2009 12:56:50 -0700 (PDT)

Hi all!

I need to multiply and sum up 3 dimensional matrices. I noticed that my
script run way slower on octave. I traced the problem to the actual
multiplication of the matrices. For example take the following script:

--snip --
Q=rand(256,256,10);
W=rand(256,256,10);

tic
for ind=1:10;
        Q(:,:,ind).*W(:,:,ind);
end
toc
--snip--

On a machine having both matlab ( Version 7.5.0.338 (R2007b)) and octave
(3.0.5 configured for "x86_64-redhat-linux-gnu") the average timings from a
few runs are

matlab: 0.0086 seconds
octave: 0.3350 seconds

Naturally my question is, why?

On a separate machine (on which I have administrative rights) I checked what
difference makes if I install an sse2 optimized ATLAS-package instead of the
general one. The octave results improved roughly 10%. 

-Szabi
-- 
View this message in context: 
http://www.nabble.com/Octave-vs.-Matlab-speed-difference%2C-any-suggestions--tp24853287p24853287.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

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