octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dot product full-sparse


From: Marco Caliari
Subject: Dot product full-sparse
Date: Wed, 11 Aug 2010 08:20:21 +0200 (CEST)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

Dear maintainers,

if I run

A = toeplitz ([-2, 1, 1, 1, zeros(1, 856)]);
A = reshape (A, 18490, 40);
SA = sparse (A);
B = rand (size (A));
tic, A .* B;,toc
tic, SA .* B;, toc
tic, SA .* sparse (B);, toc

I get

Elapsed time is 0.00745105 seconds.
Elapsed time is 0.229055 seconds.
Elapsed time is 0.0203849 seconds.

(3.3.51 with Suitesparse 3.5.0, similar results with 3.2.4 with Suitesparse 3.4.0). Why SA .* sparse (B) is so faster than SA .* B? What is done by default when a full-sparse dot product is required?

Best regards,

Marco


reply via email to

[Prev in Thread] Current Thread [Next in Thread]