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

David Cournapeau david at ar.media.kyoto-u.ac.jp
Fri Apr 3 07:05:26 EDT 2009


Stéfan van der Walt wrote:
> 2009/4/2 William K. Coulter <wcoulter at 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,

cheers,

David



More information about the SciPy-User mailing list