[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: octave benchmark test
From: |
Dmitri A. Sergatskov |
Subject: |
Re: octave benchmark test |
Date: |
Mon, 08 Mar 2004 17:17:30 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115 |
Paul Kienzle wrote:
It is reported to have better performance on partially ordered lists,
but worse on random data compared to matlab.
Well, may be I misunderstood what does "partially ordered means", but here is
what I got.
(Matlab 6.5):
>> x1=rand(3000); % random
>> x2=[1:3000]; % ordered
>> x3=repmat(x2,3000,1); %
>> x=x3+2*x1; % partially ordered ?
>> tic ; sort(x1) ; toc
elapsed_time =
1.4351
>> tic ; sort(x3) ; toc
elapsed_time =
0.8567
>> tic ; sort(x) ; toc
elapsed_time =
1.4285
>> x=x3+1.1*x1;
>> tic ; sort(x) ; toc
elapsed_time =
1.4355
>> tic ; [y,idx]=sort(x) ; toc
elapsed_time =
2.2073
>> tic ; [y,idx]=sort(x) ; toc % So we will not need to allocate y and idx
elapsed_time =
2.0607
(Octave 2.1.56):
octave:1> x1=rand(3000);
octave:2> x2=[1:3000];
octave:3> x3=repmat(x2,3000,1);
octave:4> x=x3+2*x1;
octave:5> tic ; sort(x) ; toc
ans = 2.1968
octave:6> tic ; sort(x1) ; toc
ans = 1.9328
octave:7> tic ; sort(x3) ; toc
ans = 0.58155
octave:8> tic ; [y,idx]= sort(x) ; toc
ans = 3.5003
octave:9> tic ; [y,idx]= sort(x) ; toc
ans = 3.4638
Paul Kienzle
address@hidden
Dmitri.
-------------------------------------------------------------
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 benchmark test, Paul Thomas, 2004/03/07
- Re: octave benchmark test, David Bateman, 2004/03/07
- Re: octave benchmark test, Michael Martin, 2004/03/08
- Re: octave benchmark test, David Bateman, 2004/03/09
- Re: octave benchmark test, Henry F. Mollet, 2004/03/09
- Re: octave benchmark test, Paul Kienzle, 2004/03/09
- Re: octave benchmark test, Paul Thomas, 2004/03/10
- octave derived classes - a couple of questions, Paul Thomas, 2004/03/12