octave-maintainers
[Top][All Lists]
Advanced

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

Re: slow LU decomposiotion? for octave 4 for windows


From: siko1056
Subject: Re: slow LU decomposiotion? for octave 4 for windows
Date: Tue, 31 May 2016 05:07:41 -0700 (PDT)

Dear Tatsuro MATSUOKA,

Do you also this performance issue for the vectorized test script in all
your versions? I see similar good results on my PC without for-loops and
Octave 4.0.1 and dev.

------------------
more off 

Num=1000;
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; 
x=A\B;  % vectorized
toc; 
x1=x(:,end); 
% 
disp('LU decomposition'); 
tic; 
c=P*B; y=L\c; x=U\y;  % vectorized
toc; 
x2=x(:,end); 
id=1:Num; 
plot(id,x1, 'o1',id,x2, '+2'); 
------------------

This would make me struggle. For-loops are slow (Rik held an excellent talk
about this at the Octconf 2015, http://wiki.octave.org/OctConf_2015) and
maybe older versions of Octave handled loops in another way?!

Regards,
Kai



--
View this message in context: 
http://octave.1599824.n4.nabble.com/slow-LU-decomposiotion-for-octave-4-for-windows-tp4677291p4677304.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.



reply via email to

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