compare the executive speed with Matlab
Jaroslav Hajek
highegg at gmail.com
Sat Jan 3 13:34:29 CST 2009
On Sat, Jan 3, 2009 at 6:40 PM, Howard <shj1130 at pchome.com.tw> wrote:
> Hi Michael,
>
> Thanks for your reply.
> The attached files are codes for testing the executive time.
> As you can see that below are my executive result, it looks Octave's
> executive speed is slower than Matlab. I thought Octave should be better
> than Matlab. Do you have any idea about it?
>
I just wonder why did you think that?
> Thanks!
>
> *Octave on Ubuntu Linux
> ExecutiveTime.m 3.876s
> BinomialEuro.m 20.8s
> BlackScholesEuro.m 0.0594s
>
> *Octave on Windows
> ExecutiveTime.m 9.97s
> BinomialEuro.m 41.1s
> BlackScholesEuro 0.235s
>
> *Matlab on Windows
> ExecutiveTime.m 0.0176s
> BinomialEuro.m 0.092721s
> BlackScholesEuro 0.000835s
>
> Best regards,
>
> Howard Su
>
ExecutiveTime and BinomialEuro are loopy, so there's no big surprise -
Matlab does JIT compiling, Octave does not, and probably won't in the
near future.
Btw, BinomialEuro can be easily vectorized, which I suppose would
reduce the speed penalty significantly. Another option is to make it a
compiled function.
BlackScholesEuro is a different story - apparently something is done
significantly more slowly.
--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
More information about the Help-octave
mailing list