help-octave
[Top][All Lists]
Advanced

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

Re: Performance: Octave vs. Matlab


From: John Eaton
Subject: Re: Performance: Octave vs. Matlab
Date: Tue, 02 May 95 18:40:55 EDT

address@hidden wrote:

: Yes, of course there are many reasons to use an interpreter for
: simple simulations instead of writing programs in C, C++, etc..  
: Why not wishing to have a faster one when we have several 
: choices of similar interpreters?

I agree that it would be nice for Octave to be faster, and I have done
some work to try to make this happen.  However, I have to be careful to
judge whether the time spent working on speeding up the interpreter is
worth it.  It could be spent doing other things, like improving the
plotting or string handling capabilities.

If you really want Octave to be faster, you have the source code, and
you can work on making it faster.  If you do, I hope you will share
the changes with the rest of us!

: Here is a session of Matlab:
: 
: ¯ tic; bench1(10); toc
: 
: elapsed_time =
: 
:    11.0900
: 
: ¯ 
: 
: The bench1.m was
: ----------------------------
: function [z] = bench1 (n)
: for i=1:n,
:     for j=1:1000,
:         z=log(j);
:         z1=log(j+1);
:         z2=log(j+2);
:         z3=log(j+3);
:         z4=log(j+4);
:         z5=log(j+5);
:         z6=log(j+6);
:         z7=log(j+7);
:         z8=log(j+8);
:         z9=log(j+9);
:     end
: end
: z = z9;

: And, for the same program (translated keywords only), octave 1.1.0 for
: OS/2 gave 32 seconds which is about 3 times slower than Matlab for Win.
: and cannot be said as "slight" overheads.  How do you think?

Running this on a SPARCstation 2 with 1.1.1 took 160 CPU seconds.
With the current development version, it took 135.  Maybe this could
be even better if someone were to spend some time working on it.  (I
probably won't spend much time on it, since there are many things that
I think are more important to work on right now.)

: BTW, I found there exists ver. 1.1.1, but my OS/2 version is 1.1.0.
: Can I expect a newer version of octave for OS/2 soon?

I don't know.  I've got the changes to port 1.1.0 to OS/2, but haven't
finished merging them in.  I hope that OS/2 will be supported `out of
the box' in 1.2, but I don't have an OS/2 system to work with, so I
have to depend on others to help out.  Luckily, some people have been
willing to help.  Without them, there would be no OS/2 version at all.

: Can I have getl() function like the one in Matlab?

It is on the list of things to do, but so far no one has written it.

jwe


reply via email to

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