-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Open
Description
MWE:
using Random
using LinearAlgebra
Random.seed!(1234)
G = rand(2000, 2000);
Q = rand(2000, 2000);
Z = G + im * Q;
function f(A, b)
F = lu(A; check=false)
L, U, P = F
y = L \ (b[P, :])
return U \ y
end
@time f(G, Z);In Julia 1.10
julia> @time f(G, Z);
8.785467 seconds (13.07 k allocations: 275.582 MiB, 0.35% gc time, 0.25% compilation time)In Julia 1.9
julia> @time f(G, Z);
0.711327 seconds (18 allocations: 396.760 MiB, 1.92% gc time)tracking to this fallback implement:
julia/stdlib/LinearAlgebra/src/triangular.jl
Line 1124 in 95f30e5
| function generic_trimatdiv!(C::AbstractVecOrMat, uploc, isunitc, tfun::Function, A::AbstractMatrix, B::AbstractVecOrMat) |
the LAPACK routine is not hit because eltype(C) !== eltype(A)
julia/stdlib/LinearAlgebra/src/triangular.jl
Line 830 in 95f30e5
| generic_trimatdiv!(C::StridedVecOrMat{T}, uploc, isunitc, tfun::Function, A::StridedMatrix{T}, B::AbstractVecOrMat{T}) where {T<:BlasFloat} = |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels