-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
KrylovKit.jl/src/eigsolve/eigsolve.jl
Line 189 in 68ced46
x₀ = Random.rand!(similar(A, T, size(A, 1))) |
For sparse A
, above line leads to a dense SparseVector
x₀
. Being dense, multiplications A*x₀
are slow and lead to excessive allocations. In my benchmarking, runtime for A
with density ~5% exceeds that of calling eigsolve(collect(A)...)
. This also leads to inconsistent runtime/memory usage between calling eigsolve(A,...)
and eigsolve(A, size(A,1), ...)
, as the latter correctly initializes a x₀::Vector{Float64}
.
Metadata
Metadata
Assignees
Labels
No labels