title: Arpack++ sparse eigen solver many times slower than equivalent Matlab eigs()
body: <p>I need to compute the n smallest magnitude eigen vectors of a very large sparse symmetric  matrix in a C++ program. For my example, lets say n=30 and the matrix is 10k by 10k with about 70k non-zero values.</p>
  
  <p>Upon a lot of research and experimenting with some libraries I found that ARPACK++ would probably be my best bet, I installed it following the steps <a href="https://help.ubuntu.com/community/Arpack%2B%2B" rel="nofollow">in this page</a>.</p>
  
  <p>The computation is made with the following snippet:</p>
  
  <pre><code>// L is an Eigen library matrix
  L.makeCompressed();
  
  ARluSymMatrix&lt;MTYPE&gt; A(L.cols(), L.nonZeros(), L.valuePtr(), L.innerIndexPtr(), L.outerIndexPtr(), 'U');
  
  ARluSymStdEig&lt;MTYPE&gt; eig(n, A, "SM");
  
  TIC
  eig.FindEigenvectors();
  TOC
  </code></pre>
  
  <p>which gets me the correct result but takes about 8.5 seconds, whereas in Matlab I can get the same result in about 0.5 seconds simply by calling</p>
  
  <pre><code>tic
  [V,D] = eigs(L,30,'sm');
  toc
  </code></pre>
  
  <p>From my reasearch on the topic Matlab <code>eigs()</code> also calls the ARPACK fortran libs for the same computations so I don't understand why is the C++ wrapper so much slower.</p>
  
  <p>Also ARPACK++ behaves very strangely in many situations such as when I try to use floats instead of doubles the program will simply stop and do nothing till I take it down, or when trying to compute the eigenvectors around a value like 0 or 0.0001, which should be equivalent to 'SM', it simply spits out garbage and crashes.</p>
  
  <p>Therefore my doubt is if ARPACK++ is really that slow or all of these are symptoms of some bad configuration/installation and if so what can I do to solve it.
  Thanks for any help you can provide.</p>