JuliaIntervals / IntervalLinearAlgebra.jl

Linear algebra done rigorously
MIT License
36 stars 9 forks source link

speed up H-matrix test #126

Closed lucaferranti closed 2 years ago

lucaferranti commented 2 years ago

PR description

Profiling the PILS solver, I noticed most time was spent on the H-matrix test, this PR speeds up the test. The benchmarks below show testing whether a 449x449 matrix is an H-matrix and the overal time for the solver from the continuum mechanics FEM example

Before

julia> @btime is_H_matrix($D) # size 449 x 449, this is the comparison matrix computed in the parametric solver
  126.968 ms (21 allocations: 6.43 MiB)
true

julia> @btime solve($K, $FLib, $Erange)
  180.183 ms (68 allocations: 25.18 MiB)

After

julia> @btime is_H_matrix($D)
  9.605 ms (9 allocations: 4.63 MiB)
true

julia> @btime solve($K, $FLib, $Erange)
  51.125 ms (56 allocations: 23.38 MiB)
codecov-commenter commented 2 years ago

Codecov Report

Merging #126 (9adef89) into main (ffdb047) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #126   +/-   ##
=======================================
  Coverage   97.19%   97.19%           
=======================================
  Files          17       17           
  Lines         641      642    +1     
=======================================
+ Hits          623      624    +1     
  Misses         18       18           
Impacted Files Coverage Δ
src/classify.jl 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ffdb047...9adef89. Read the comment docs.