[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Wed, 11 Mar 2009 23:57:54 +0100
Hello to all.
I've tried to execute the same routine (see attachment) with matlab,
octave and a C program.
There are the results ( both of programs under Linux )
>> tic ; kernel(magic(100)) ; toc
Elapsed time is 0.052000 seconds.
octave:1> tic ; kernel(magic(100)) ; toc
Elapsed time is 56.9406 seconds.
Why this difference?
Where is the bottleneck of Octave? There is some documentation about this?
Many Thanks. ( Please CC'd me in reply as I'm not a follower of this list )
function G = kernel(A)
colonne_m = size(A)(2);
righe_n = size(A)(1);
G = zeros(righe_n,righe_n);
for i = 1:righe_n
for j = 1:colonne_m
for k = 1:colonne_m
G(i,j) = G(i,j)+(A(i,k)*A(j,k));
G(i,j) = (G(i,j)+1)^3;
Description: Binary data
- Performance test,