[Scilab-users] Pairwise distance of a huge amount of points

Samuel Gougeon sgougeon at free.fr
Sat Aug 30 00:01:37 CEST 2014


Le 29/08/2014 12:58, Dang, Christophe a écrit :
> Just to close the subject:
>
> I tried to implement the algorithm with sparse matrices, and it is less efficient than scanning over one dimension: 7 times faster than the naive algorithm.
Yes, it was somewhat expected. Also for memory consumption, the sparse 
encoding becomes interesting vs the dense encoding only when the 
sparsity becomes smaller than .. 50%.
There was a quite recent thread on bugzilla, about the relevance of 
keeping a sparse encoding for the result of cos(SP) where SP is a sparse 
(so with a good fraction of null values).
It was finally -- wisely -- decided (after some tests) to switch to a 
dense encoding for that case (as it should be for any function turning 0 
into a non-null value).

Samuel




More information about the users mailing list