help-octave
[Top][All Lists]
Advanced

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

Re: speed of octave interpreter


From: Brendan Drew
Subject: Re: speed of octave interpreter
Date: Wed, 28 Sep 2005 09:51:39 -0600
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

The STL uses a hybrid of quicksort and heapsort (introspectsort I believe it's called) which works by using quicksort until the stack depth reaches some predetermined threshold. At this point, it switches to heapsort to solve that subproblem. Results are what you'd expect for a quicksort with guaranteed O(n lg n) run time. SGI's numbers placed it roughly neck-and-neck with qsort on non-pathological inputs (i.e. roughly twice as fast as heapsort), but significantly better than heapsort on pathological inputs. Maybe this is worth investigating?

~B


David Bateman wrote:

Mike Miller a écrit :

On Tue, 27 Sep 2005, David Bateman wrote:

Yes these benchmarks have been examined. Perhaps a good starting point in the discussion of these is

http://www.octave.org/octave-lists/archive/octave-maintainers.2004/msg00074.html




Octave did very well in that comparison with MATLAB. It was only on Toeplitz that MATLAB really crushed Octave (about a factor of 6). On Escoufier MATLAB was twice as fast as Octave, and on 'sort' Octave took about 70% longer. Otherwise, they were fairly similar and Octave was faster than MATLAB on a few (Programmation section, especially Fibonacci).

For-loops and recursion are where matlab has problems. Do a search for the word "compiler" on the lists for 2004 and 2005 and you'll find some early work to address such issues as well...

I'm very impressed with Octave's speed on these tests. I can see that you followed up with a huge amount of work on 'sort,' so 'sort' must now be as much improved.



I made a choice with sort to use a heap sort while Matlab uses quick sort.. This means that octave is much faster on partially sorted lists than matlab, while matlab is faster on random vectors as in this benchmark. I think partially sorted lists are occur more often than random lists in real life. So here I think the benchmark is incorrect..


Does anyone know how the current Octave stacks up against MATLAB? It seems like it must be doing very well.

In this benchmark I don't think much has changed as it is not a complete test of all of octave's functionality, just that that inteested the author of the benchmark. All benchmark's should be taken with a grain of salt..

D.


Mike



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------





-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



--
Brendan Drew
Research Scientist
PercepTek, Inc.
12395 North Mead Way
Littleton, CO 80125
Tel: 720-344-1037 x 126
Fax: 720-344-2360



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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