help-octave
[Top][All Lists]
Advanced

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

Octave versus matlab performances on linux platform 64 bits


From: Luca Tagliacozzo
Subject: Octave versus matlab performances on linux platform 64 bits
Date: Thu, 30 Oct 2008 16:01:46 +1000

Hello, I was wondering what  I am doing wrong:

I was planning to pass some matlab programs to octave but as I will have to do real simulation I was planning to write them in C++.

Before starting the project I decided to make a simple test.

I took the DaCoda example of the matpow.m file, did the esteatical changes such that it can be run on matlab,

and I run it on matlab via the following script: test.m


a=matpow(rand(1000),10);


That is it mutliplies log_2(10) times  a 1000x1000 matrix

By running
time matlab -nodisplay <test.m

       
I get     0m4.076s as a user time

we see that it take 4.076s to execute on my already fully loaded machine.

Now always with the matpow.m file i did the following test:

time octave test.m: user    0m21.189s
where we see that Octave took 21.189 seconds  (like 7 times matlab)

Till here nothing strange since I was exectuing the matpow.m file.
Now I compile the matpow.cc and I crosscheck that octave sees it:


octave:1> help matpow
Return b = a^n for square matrix a, and non-negative, integral n./home/luca/Desktop/testing_perf/matpow.oct
......

where we see that indeed it does see it in /home/luca/Desktop/testing_perf/matpow.oct

So now I run again the test: and we see that the the time is now 20.161s very slight variation with respect to the non compiled case.


I thought it could be a matter of overload taken by octave to startup so I decided to increase the matrix size to 3000x3000 where we would expect that this should run for around 10 minutes so that the starting overhead should be negligible




By running the .m file with matlab I get: 1m3.564s

By running the .oct file with octave I get: a user time 8m59.474s

By running the .m file with octave I get: 8m58.702s



So I do not get any increase of performance by compiling the matlab matpow.cc .


What am I missing?
Regards
Luca

reply via email to

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