LinearSolve.jl
LinearSolve.jl copied to clipboard
A*u doesn't specialize for sparse A and LinearProblem solution u
Here is an MWE:
using SparseArrays,LinearSolve
n=10000;
A=spdiagm(-1=>-rand(n-1),0=>fill(2,n),1=>-rand(n-1));
b=ones(n);
x=solve(LinearProblem(A,b));
@time A*x;
@time A*x.u;
gives
0.507018 seconds (2 allocations: 78.172 KiB)
0.000102 seconds (3 allocations: 78.312 KiB)
Somewhere a Base.*
for a SciMLBase.LinearSolution
seems to be missing...
Not sure where to put a PR...