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

Sebastian Walter sebastian.walter@gmail....
Fri Apr 3 06:24:08 CDT 2009


i agree with david.
Sparse matrix packages are for a density of O(N) for a (N,N) matrix.



On Fri, Apr 3, 2009 at 1:05 PM, David Cournapeau
<david@ar.media.kyoto-u.ac.jp> wrote:
> 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,
>
> cheers,
>
> David
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>


More information about the SciPy-user mailing list