[SciPy-user] Getting the right numerical libraries for scipy

David Cournapeau david@ar.media.kyoto-u.ac...
Fri Apr 3 06:05:26 CDT 2009

Stéfan van der Walt wrote:
> 2009/4/2 William K. Coulter <wcoulter@berkeley.edu>:
>> I wanted to optimize my python code to use the scipy.sparse library;
>> however, benchmarking reveals that multiplying a sparse and dense matrix
>> takes over 100 times as long as multiplying the equivalent two dense
>> matrices.
> I did some benchmarks now (see attached), and I see the same behaviour:
> http://mentat.za.net/refer/bench_sparse.png

Isn't this expected ? I thought that for sparse matrix to be useful, the
density had to be much lower than the figures you used ?

Maybe a more useful benchmark would be the dense/sparse ratio as a
function of density for a given size,



More information about the SciPy-user mailing list