title: Improving Performance of Multiplication of Scipy Sparse Matrices
body: <p>Given a Scipy CSC Sparse matrix "sm" with dimensions (170k x 170k) with 440 million non-null points and a sparse CSC vector "v" (170k x 1) with a few non-null points, is there anything that can be done to improve the performance of the operation:</p>
  
  <pre><code>resul = sm.dot(v)
  </code></pre>
  
  <p>?</p>
  
  <p>Currently it's taking roughly 1 second. Initializing the matrices as CSR increased the time up to 3 seconds, so CSC performed better.</p>
  
  <p>SM is a matrix of similarities between products and V is the vector that represents which products the user bought or clicked on. So for every user sm is the same.</p>
  
  <p>I'm using Ubuntu 13.04, Intel i3 @3.4GHz, 4 Cores.</p>
  
  <p>Researching on SO I read about Ablas package. I typed into the terminal:</p>
  
  <pre><code>~$ ldd /usr/lib/python2.7/dist-packages/numpy/core/_dotblas.so
  </code></pre>
  
  <p>Which resulted in:</p>
  
  <pre><code>    linux-vdso.so.1 =&gt;  (0x00007fff56a88000)
      libblas.so.3 =&gt; /usr/lib/libblas.so.3 (0x00007f888137f000)
      libc.so.6 =&gt; /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8880fb7000)
      libm.so.6 =&gt; /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8880cb1000)
      /lib64/ld-linux-x86-64.so.2 (0x00007f888183c000)
  </code></pre>
  
  <p>And for what I understood this means that I'm already using a high performance package from Ablas. I'm still not sure though if this package already implements parallel computing but it looks like it doesn't. </p>
  
  <p>Could multi-core processing help to boost performance? If so, is there any library that could be helpful in python?</p>
  
  <p>I was also considering the idea of implementing this in Cython but I don't know if this would lead to good results.</p>
  
  <p>Thanks in advance.</p>