[Numpy-discussion] Tuning sparse stuff in NumPy

David Koch ogdude@googlemail....
Mon Mar 26 10:11:20 CDT 2007


Hi,

I ran some tests on the very same matrices in Matlab/Numpy and it seems that
for sparse matrix multipilcation to be faster than dense multiplication -
the degree of sparsity has to be much higher in Numpy than in Matlab. Is
there anything I can tune in the underlying routines? I need good
performance at about 0.02 +- 0.01 nnz elements.

Thanks,

/David



Matrix size: 10k * 1k, times are in seconds:

sparsity: 0.01 nonzero elements
Matlab dense 3.9, sparse 0.09
Numpy dense 2.9, sparse 15.24

sparsity: increase sparsity to 0.001 nnz
Matlab dense 3.9, sparse 0.002
Numpy dense 2.9, sparse 0.27
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070326/755a627e/attachment-0001.html 


More information about the Numpy-discussion mailing list