help-octave
[Top][All Lists]
Advanced

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

Execution time for SVD


From: Henk Borsje
Subject: Execution time for SVD
Date: Wed, 29 Jan 2020 20:24:02 +0100

I am at a loss explaining the difference in time for Octave 5.1.90 to execute the following statements:

 

tic; svd(rand(3000)); toc                                                                           (I a)

Elapsed time is 11.3338 seconds

 

tic; [a,b,c] = svd(rand(3000)); toc                                                           (II a)

Elapsed time is 148.349 seconds.

 

tic; a = rand(3000);b=rand(3000);c=rand(3000); toc                         (III a)

Elapsed time is 0.263816 seconds.

 

Why is there this very large difference in execution time in statement (II) ?

 

For comparison, here is what MATLAB does:

 

tic; svd(rand(3000)); toc                                                                           (I b)

Elapsed time is 10.845707 seconds.

 

tic; [a,b,c] = svd(rand(3000)); toc                                                           (II b)

Elapsed time is 13.388534 seconds.

 

tic; a = rand(3000);b = rand(3000); c = rand(3000);  toc                   (III b)

Elapsed time is 0.252371 seconds.

 

I have repeated these statements several times and found the reported times to be consistent.

 

Henk Borsje


reply via email to

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