-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add logabsdet method for UmfpackLU #40716
Conversation
Co-authored-by: Daniel Karrasch <[email protected]>
I have another way to compute the sign of the permutation, inspired by code from Permutations.jl. Should I push it here and you profile your benchmark cases with it? |
Yes, that would be great! |
That's an improvement! I also did some more testing and you were right, the call to This method is still a bit slower than the default version for a dense using LinearAlgebra, SparseArrays, BenchmarkTools
n = 2000
pnz = 0.0001
A = sprandn(n, n, pnz); A = A'A + I
Adense = Matrix(A)
F = lu(A)
Fdense = lu(Adense)
@btime logabsdet($F) # 58.337 μs (13 allocations: 127.23 KiB)
@btime logabsdet($Fdense) # 30.058 μs (0 allocations: 0 bytes)
@btime logabsdet($A) # 252.128 μs (77 allocations: 1.05 MiB)
@btime logabsdet($Adense) # 43.563 ms (3 allocations: 30.53 MiB)
|
Co-authored-by: Daniel Karrasch <[email protected]>
Co-authored-by: Daniel Karrasch <[email protected]>
Replacement for #38476 after I borked a rebase. Will fix JuliaLang/LinearAlgebra.jl#788. This new method is a direct translation of the dense
logabsdet(::LU)
method in LinearAlgebra:julia/stdlib/LinearAlgebra/src/lu.jl
Line 457 in 3365b4e
Performance problems mentioned in the previous PR should have been fixed by #40663.