octave-maintainers
[Top][All Lists]
Advanced

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

slow LU decomposiotion? for octave 4 for windows


From: Tatsuro MATSUOKA
Subject: slow LU decomposiotion? for octave 4 for windows
Date: Tue, 31 May 2016 15:41:41 +0900 (JST)

Hello

I am now preparing the lecture notes for my class using octave on my University.
I noticed that bench mark for the lu decomposition is slow on octave 4. 

% lutest.m 
more off

Num=1000; ItNum=10;
rand('seed',1);
A=rand(Num)-0.5;
rand('seed',2);
B=rand(Num,ItNum)-0.5;
[L U P]=lu(A);
%
disp('Simple left division');
tic;
for k=1:ItNum
  b=B(:,k);
  x=A\b;
end
toc;
x1=x;
%
disp('LU decomposition');
tic;
for k=1:ItNum
  b=B(:,k);
  c=P*b; y=L\c; x=U\y;
end
toc;
x2=x;
id=1:Num;
plot(id,x1, 'o1',id,x2, '+2');

% End of lutest.m 



************************************
Octave-3.2.4 mingw
>> lutest
Simple left division
Elapsed time is 1.11575 seconds.
LU decomposition
Elapsed time is 0.031021 seconds.

************************************
Octave-3.6.4 msvc


>> lutest
Simple left division
Elapsed time is 1.104 seconds.
LU decomposition
Elapsed time is 0.023 seconds.


************************************
Octave-3.6.4 mingw

>> lutest
Simple left division

Elapsed time is 0.749499 seconds.
LU decomposition
Elapsed time is 0.0220149 seconds.

************************************
Octave-3.8.2 mingw


>> lutest
Simple left division
Elapsed time is 0.951635 seconds.
LU decomposition
Elapsed time is 0.0330231 seconds.

************************************
Octave-4.0.0 mingw (32 bit)

>> lutest
Simple left division
Elapsed time is 0.681452 seconds.
LU decomposition
Elapsed time is 0.154103 seconds.

************************************
Octave-4.0.2 mingw (32 bit)

>> lutest
Simple left division
Elapsed time is 0.588393 seconds.
LU decomposition
Elapsed time is 0.257169 seconds.


************************************
Octave-4.0.2 mingw (64 bit)

>> lutest
Simple left division
Elapsed time is 0.526351 seconds.
LU decomposition
Elapsed time is 0.112075 seconds.

************************************
octave-4.1.0+ mingw (64bit)
(hg clone on May 28, 2016)

>> lutest
Simple left division
Elapsed time is 2.01935 seconds.
LU decomposition
Elapsed time is 0.125084 seconds.
************************************

The lu decomposition test is very slow on octave 4.
While simple division is fastest on octave 4.0 but is slowest on 4.1.0+.

What happens ?

Does anyone see this on other platforms?


Tatsuro MATSUOKA

Department of Chemical Engineering
Nagoya University, Japan



reply via email to

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