On 5 Sep 2010, at 16:14, c. wrote:
> In case anyone wants to check the results shown in that paper I
> prepared a script performing (what is my interpretetion of)
> the benchmarks listed in the tables, this could be helpful for
> keeping the discussion with the authors on technical grounds rather
> than starting a flamewar.
> I also reported the results I obtained on my 2.5 years old core2-duo
> macbook running OS X 10.5.8 and Octave.app 3.2.3.
> My guess is that those guys somehow got a version of Octave linked
> to a poor implementation of BLAS/LAPACK
>
> HTH,
> c.
>
> P.S. tests from the statistics section are missing as I went out of
> time, sorry
Just for curiosity I ran the same tests with Matlab 2007b.
--------------8<--------------8<--------------
clear all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Miscellaneous operations freemat mathnium
octave R Scilab
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Loop test 10,000 × 10,000 601.606 798.788
1526.000 261.077 271.713
tic, for ii=1:1e4, for jj=1:1e4, end, end, toc()
%Elapsed time is 14.674 seconds. (OCTAVE 3.2.3)
%Elapsed time is 5.390617 seconds. (MATLAB 2007b)
% 2000 × 2000 random matrix^1000 1.573 3.886
0.592 0.745 29.398
a = rand(2000);
tic, a^1e3; toc()
%Elapsed time is 23.488 seconds. (OCTAVE 3.2.3)
%Elapsed time is 42.178718 seconds.(MATLAB 2007b)
tic, a.^1e3; toc()
%Elapsed time is 0.42365 seconds. (OCTAVE 3.2.3)
%Elapsed time is 0.931563 seconds. (MATLAB 2007b)
% Sorting of 5,000,000 random values 4.545 94.692
1.581 1.449 2.300
a = rand (5e6, 1);
tic (), sort (a); toc ()
%Elapsed time is 1.2075 seconds. (OCTAVE 3.2.3)
%Elapsed time is 0.762534 seconds. (MATLAB 2007b)
% FFT over 220 random values 0.405 23.912
0.137 0.763 0.991
a = rand (220, 1);
tic (), fft (a); toc ()
%Elapsed time is 0.00012302 seconds. (OCTAVE 3.2.3)
%Elapsed time is 0.005763 seconds. (MATLAB 2007b)
% Calculation of 2,000,000 Fibonacci numbers 1.798 81.205
2.514 0.430 3.047
nf = 2e6;
%with for loop
tic; fib = ones (nf, 1); for ii=3:nf; fib(ii) = fib(ii-1)+fib(ii-2);
end; toc()
%Elapsed time is 39.529878 seconds. (OCTAVE 3.2.3)
%Elapsed time is 0.475654 seconds. (MATLAB 2007b)
%with filter
tic (); x = [1; zeros(nf-1, 1)]; a = [1 -1 -1]; b = 1; fibfil =
filter(b, a, x); toc ()
%Elapsed time is 0.8 seconds. (OCTAVE 3.2.3)
%Elapsed time is 0.318991 seconds. (MATLAB 2007b)
isequal (fib, fibfil)
%ans = 1
% Factorial of a big integer (10 digits) 0.002 0.003
0.007 0.008 0.003
a = floor (rand (1)*1e10)
%a = 8.2000e+09 (OCTAVE 3.2.3)
tic, factorial (a); toc
%Elapsed time is 0.000299 seconds. (OCTAVE 3.2.3)
%a = 8.5480e+09 (MATLAB 2007b)
%Elapsed time is 0.203658 seconds. (MATLAB 2007b)
% Plot 2-D on 200,000 points 0.563 1.072
0.128 7.988 19.292
%with gnuplot
a = rand (2e5, 1);
tic (); plot (a); toc ()
%Elapsed time is 0.6472 seconds. (OCTAVE 3.2.3) (but the window takes
much longer to show up)
%Elapsed time is 0.463007 seconds.(MATLAB 2007b)
%close all
%backend ('fltk')
%tic (); plot (a); toc ()
%Elapsed time is 0.04016 seconds. (and the window comes up very quickly)
% Plot 3-D on 200,000 points 1.105 3.691
0.091 0.216 1.789
%close all
%backend ('gnuplot')
tic (); plot3 (a,a,a); toc ()
%Elapsed time is 0.438453 seconds. (OCTAVE 3.2.3) (but the window
takes forever to show up)
%Elapsed time is 0.100713 seconds. (MATLAB 2007b)
%close all
%backend ('fltk')
%tic (); plot3 (a); toc ()
%Elapsed time is 0.04582 seconds. (and the window comes up very quickly)
% Average performance for this group 37.71% 14.57%
68.49% 57.62% 31.01%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Matrix operations
freemat mathnium octave R Scilab
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Matrix multiplication among two 2000 × 2000 random matrices
8.187 171.389 18.664 0.070 4.626
a = rand (2e3, 2e3);
b = rand (2e3, 2e3);
tic (); a*b; toc ()
%Elapsed time is 1.3 seconds. (OCTAVE 3.2.3)
%Elapsed time is 2.775727 seconds. (MATLAB 2007b)
tic (); a.*b; toc ()
%Elapsed time is 0.06476 seconds. (OCTAVE 3.2.3)
%Elapsed time is 0.090595 seconds. (MATLAB 2007b)
% Transpose of a 2000 × 2000 random matrix
0.311 2.494 0.110 1.853 0.127
tic (); a'; toc ()
%Elapsed time is 0.06137 seconds. (OCTAVE 3.2.3)
%Elapsed time is 0.073362 seconds. (MATLAB 2007b)
tic (); a.'; toc ()
%Elapsed time is 0.066 seconds. (OCTAVE 3.2.3)
%Elapsed time is 0.074273 seconds. (MATLAB 2007b)
% Creation of a 2000 × 2000 Hilbert matrix
0.042 - 0.351 0.519 0.229
tic (); a = hilb (2e3); toc ()
%Elapsed time is 0.3474 seconds. (OCTAVE 3.2.3)
%Elapsed time is 0.351489 seconds. (MATLAB 2007b)
% Hessenberg form of a 2000 × 2000 random matrix
- 501.603 1274.100 - 29.412
a = rand (2e3, 2e3);
tic (); hess (a); toc ()
%Elapsed time is 11.886 seconds. (OCTAVE 3.2.3)
%Elapsed time is 10.868122 seconds.(MATLAB 2007b)
% Rank of a 2000 × 2000 random matrix
32.150 308.015 27.225 15.597 29.273
tic (); rank (a); toc ()
%Elapsed time is 13.795 seconds. (OCTAVE 3.2.3)
%Elapsed time is 13.845157 seconds.(MATLAB 2007b)
% Trace of a 2000 × 2000 random matrix
60.195 0.679 0.028 0.038 0.005
tic (); trace (a); toc ()
%Elapsed time is 0.003068 seconds. (OCTAVE 3.2.3)
%Elapsed time is 0.003581 seconds. (MATLAB 2007b)
% Condition number of a 2000 × 2000 random matrix
491.47 3939.406 20.735 16.853 29.257
tic (); cond (a); toc ()
%Elapsed time is 13.394 seconds. (OCTAVE 3.2.3)
%Elapsed time is 13.796607 seconds.(MATLAB 2007b)
% Kronecker product of two 200 × 200 random matrices
- 20.367 0.210 0.337 0.102
a = rand (200);
b = rand (200);
tic; kron (a, b); toc ()
%error: memory exhausted or requested size too large for range of
Octave's index type -- trying to return to prompt
%??? Maximum variable size allowed by the program is exceeded.
% Average performance for the tests of this group
31.35% 2.42% 39.75% 50.90% 64.68%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Basic algebra freemat
mathnium octave R Scilab
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Determinant of a 2000 × 2000 random matrix 3.945
33.214 6.007 5.796 3.249
a = rand (2000);
tic; det (a); toc ()
%Elapsed time is 0.739024 seconds. (OCTAVE 3.2.3)
%Elapsed time is 1.328320 seconds. (MATLAB 2007b)
% Inverse of a 2000 × 2000 random matrix 533.880
78.364 18.991 24.409 9.489
tic; inv (a); toc ()
%Elapsed time is 2.23666 seconds. (OCTAVE 3.2.3)
%Elapsed time is 3.738769 seconds. (MATLAB 2007b)
% Eigenvalues of a 2000 × 2000 random matrix 44.679
3645.349 58.462 59.596 46.147
tic; eig (a); toc ()
%Elapsed time is 47.4915 seconds. (OCTAVE 3.2.3)
%Elapsed time is 25.883309 seconds. (MATLAB 2007b)
% Eigenvectors over a 2000 × 2000 random matrix 104.053
3787.40 125.200 126.105 540.456
tic; [v, l] = eig (a); toc ()
%Elapsed time is 120.715 seconds. (OCTAVE 3.2.3)
%Elapsed time is 60.933535 seconds. (MATLAB 2007b)
% 2000 × 2000 dot product matrix 8.665
181.192 18.763 11.995 4.751
a = rand (2e3, 1); b = rand (1, 2e3);
tic; a * b; toc () %% Is that what is meant by dot product matrix??
%Elapsed time is 0.0591681 seconds. (OCTAVE 3.2.3)
%Elapsed time is 0.068592 seconds. (MATLAB 2007b)
% Norm of a 2000 × 2000 random matrix 30.000
6.623 27.196 0.180 29.240
a = rand (2e3);
tic; norm (a); toc ()
%Elapsed time is 13.2002 seconds. (OCTAVE 3.2.3)
%Elapsed time is 14.482328 seconds. (MATLAB 2007b)
% Linear system solve of 1500 equations 1.903
7.151 2.764 2.677 76.925
a = rand (1.5e3); b = rand (1.5e3, 1);
tic; a \ b; toc ()
%Elapsed time is 0.40785 seconds. (OCTAVE 3.2.3)
%Elapsed time is 0.966565 seconds. (MATLAB 2007b)
% Average performance for the tests of this group 62.80%
8.26% 51.20% 66.16% 59.88%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Advanced algebra freemat
mathnium octave R Scilab
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Cholesky decomposition of a 2000 × 2000 random matrix –
- 51.931 2.843 2.920 1.716
a = rand (2e3);
a = a*a';
tic; chol (a); toc ()
%Elapsed time is 0.388352 seconds. (OCTAVE 3.2.3)
%Elapsed time is 0.741667 seconds. (MATLAB 2007b)
% Lu decomposition of a 1500 × 1500 random matrix
1.667 19.799 6.709 0.003 1.687
a = rand (1500);
tic; lu (a); toc ()
%Elapsed time is 0.689038 seconds. (OCTAVE 3.2.3)
%Elapsed time is 0.565525 seconds. (MATLAB 2007b)
% Qr decomposition of a 1200 × 1200 random matrix
3.055 54.817 24.710 3.234 2.970
a = rand (1200);
tic; qr (a); toc ()
%Elapsed time is 0.819952 seconds. (OCTAVE 3.2.3)
%Elapsed time is 0.806941 seconds. (MATLAB 2007b)
% Singular value decomposition of a 2000 × 2000 random matrix
59.016 3871.344 205.740 86.328 29.167
a = rand (2000);
tic; svd (a); toc ()
%Elapsed time is 13.3108 seconds. (OCTAVE 3.2.3)
%Elapsed time is 14.219388 seconds. (MATLAB 2007b)
% Schur decomposition of a 1500 × 1500 random matrix
- 325.062 32.601 51.172 30.227
a = rand (1500);
tic; schur (a); toc ()
%Elapsed time is 29.2586 seconds. (OCTAVE 3.2.3)
%Elapsed time is 13.650963 seconds. (MATLAB 2007b)
% Reduced Row Echelon Form of a 2000 × 2000 random matrix
311.442 21.890 269.770 – - 144.047
a = rand (2000);
tic; rref (a); toc ()
%Elapsed time is 196.287 seconds. (OCTAVE 3.2.3)
%Elapsed time is 392.817202 seconds. (MATLAB 2007b)
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev