help-octave
[Top][All Lists]
Advanced

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

Speed of Octave vs. Matlab


From: Justin Donnelly Summer Student
Subject: Speed of Octave vs. Matlab
Date: Fri, 23 Aug 1996 13:38:21 -0700

I just ran the first two tests in Matlab 4.2's bench.m program on both
Octave and Matlab, and it took about 15 times as long on Octave.  Is Octave
really this slow?  Or is there some common problem which might be the cause
of this difference?



Here is the code that I'm running:

------------------------------------------
function [t] = mybench(count)
 
if nargin < 1, count = 10; end;
 
if count > 0
   t = 0;
 
   % Loops
   n = 375;
   A = [];
   r = 1;
   tic
   for k = 1:count
      for j = 1:n
         clear A;
         r = rem(pi*r,1);
         m = fix(100*r);
         A = zeros(m,m);
      end
   end
   t(1) = toc;
 
   % LU
   n = 167;
   A = rand(n,n);
   tic
   for k = 1:count
      lu(A);
   end
   t(2) = toc;
 
end
---------------------------------------


Thanks,
Justin
address@hidden



reply via email to

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