Skip to content

Commit

Permalink
Update code comment about eigvals! performance.
Browse files Browse the repository at this point in the history
  • Loading branch information
aravindh-krishnamoorthy committed Apr 30, 2023
1 parent efbeb98 commit 86e72bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stdlib/LinearAlgebra/src/symmetriceigen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ function eigvals!(A::Hermitian{T,S}, B::Hermitian{T,S}; sortby::Union{Function,N
end
eigvecs(A::HermOrSym) = eigvecs(eigen(A))

# For A::StridedMatrix and B::Hermitian, a call to LAPACK is faster. See: https://github.com/JuliaLang/julia/issues/49533
# For A::StridedMatrix and B::Hermitian, a call to LAPACK is faster. However, for matrix sizes beyond 1000x1000 and
# positive semidefinite matrices, a Cholesky decomposition based approach may be better, see See: https://github.com/JuliaLang/julia/issues/49533
function eigvals!(A::StridedMatrix{T}, B::HermOrSym{T,S}; sortby::Union{Function,Nothing}=nothing) where {T<:BlasReal,S<:StridedMatrix}
return eigvals!(A, Matrix{T}(B); sortby)
end
Expand Down

0 comments on commit 86e72bb

Please sign in to comment.