JuliaLang/julia — Issue #268: sparse() is really slow
Author: ViralBShah
Created: 2011-11-29 07:10:40+00:00
State: open
Labels: performance

On the most simple case, our speed of sparse() is 20 times slower than matlab. I think the code can be written in a better way for sure, but I'm not sure if it will give us 20x improvement. This does not even include the cases where the inputs have to be sorted.

>> a = 1:100000;
>> tic; s = sparse(a,a,a); toc
Elapsed time is 0.010585 seconds.

julia> x = 1:100000;
julia> tic(); sparse(x,x,x); toc();
elapsed time: 0.19214701652526855 seconds