octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #43519] eigs really slow compared to Matlab


From: Jordi Gutiérrez Hermoso
Subject: [Octave-bug-tracker] [bug #43519] eigs really slow compared to Matlab
Date: Mon, 03 Nov 2014 21:17:09 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Firefox/33.0 Iceweasel/33.0

Follow-up Comment #1, bug #43519 (project octave):

I don't see comparable performance. I'm hesistant to allocate almost 2 gigs of
RAM on my aging laptop, but I can get somewhat close in order of magnitude:


octave:1> L=1000;
octave:2> a=rand(L)>0.5;b=a+a';c=sparse(b);
octave:3> tic;e=eigs(b);toc
Elapsed time is 0.991333 seconds.
octave:4> tic;e=eigs(c);toc
Elapsed time is 1.13217 seconds.

octave:5> L=2000;
octave:6> a=rand(L)>0.5;b=a+a';c=sparse(b);
octave:7> tic;e=eigs(b);toc
Elapsed time is 4.1148 seconds.
octave:8> tic;e=eigs(c);toc
Elapsed time is 7.38736 seconds.


octave:9> L=6000;
octave:10> a=rand(L)>0.5;b=a+a';c=sparse(b);
octave:11> tic; e=eigs(b); toc
Elapsed time is 56.8182 seconds.
octave:12> tic; e=eigs(c); toc
Elapsed time is 149.095 seconds.



I think the slowness here is to be expected, since this matrix is not really
sparse at 50% density. It actually takes slightly more memory to store at this
density, and it can take 1.5 times more memory to store a sparse matrix at 50%
density if you're using 64-bit indexing.

What's surprising is the huge slowness you experienced with L=8000. It looks
like times for both are growing quadratically or cubically with a different
time constant, which makes me suspect that for L=8000, your system actually
thrashed. Can you confirm that you did not see a thrash?

Compare the memory usage of Octave and Matlab for the two cases. If they are
comparable, the problem may lie elsewhere.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?43519>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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