Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Performance improvements, support for more types. Still broken for `LinearAlgebra.Symmetric` polynomial matrices, producing a `MethodError` because of a missing `oneunit` method. This, however, seems like a separate matter that would better be addressed by a separate pull request. Performance comparison: ```julia-repl julia> versioninfo() Julia Version 1.11.0-DEV.972 Commit 9884e447e79 (2023-11-23 16:16 UTC) Build Info: Official https://julialang.org/ release Platform Info: OS: Linux (x86_64-linux-gnu) CPU: 8 × AMD Ryzen 3 5300U with Radeon Graphics WORD_SIZE: 64 LLVM: libLLVM-15.0.7 (ORCJIT, znver2) Threads: 1 on 8 virtual cores julia> using LinearAlgebra, DynamicPolynomials julia> @PolyVar a b c d e; julia> f(n) = diagm( -2 => fill(a, n - 2), -1 => fill(b, n - 1), 0 => fill(c, n), 2 => fill(e, n - 2), 1 => fill(d, n - 1), ) f (generic function with 1 method) julia> const m15 = f(15); julia> const m16 = f(16); julia> @time det(m15); 2.834004 seconds (47.98 M allocations: 1.832 GiB, 16.66% gc time, 10.61% compilation time) julia> @time det(m15); 2.647003 seconds (47.94 M allocations: 1.830 GiB, 18.63% gc time) julia> @time det(m16); 6.441887 seconds (112.61 M allocations: 4.299 GiB, 20.25% gc time) julia> @time det(m16); 6.390883 seconds (112.61 M allocations: 4.299 GiB, 19.33% gc time) ``` The above REPL session is with this commit applied. The same computation with MultivariatePolynomials v0.5.3 ran for multiple minutes before I decided to just kill it. Fixes #281
- Loading branch information