Skip to content

Improve performance - #51

Merged
timholy merged 15 commits into
mainfrom
perf-constants
Aug 25, 2026
Merged

Improve performance#51
timholy merged 15 commits into
mainfrom
perf-constants

Conversation

@timholy

@timholy timholy commented Aug 25, 2026

Copy link
Copy Markdown
Member

These 15 commits improve runtime performance over all major code paths. In some cases they adjust the cap on iterations upward, but that was found to be justified by the goal of having a consistent tolerance. Preconditioning improvements often compensate by reducing the number of iterations to below what they were before this PR series began.

timholy added 15 commits August 25, 2026 12:35
Cache dense log magnitudes and sweep the grid for heuristic
covers. Preserve traversal order while storing boost entries
contiguously and deriving balance counts from the grid.

Assisted-by: Claude Opus (claude-opus-5) <noreply@anthropic.com>
Build Woodbury grids directly from `A` and construct edge-list
supports only for the other solver paths. Count support first to
select the solver.

Assisted-by: Claude Opus (claude-opus-5) <noreply@anthropic.com>
Assemble the sparse Woodbury correction in reusable CSC storage and
multiply its symmetric upper triangle directly. Separate Boolean
pattern scans from floating-point loops.

Assisted-by: Claude Opus (claude-opus-5) <noreply@anthropic.com>
Use `Int32` labels for dense boost entries when dimensions fit,
and form already-bounded bucket indices without clamping.

Assisted-by: Claude Opus (claude-opus-5) <noreply@anthropic.com>
Use grid support counts to avoid a second traversal when support is
full; retain component traversal otherwise.

Assisted-by: Claude Opus (claude-opus-5) <noreply@anthropic.com>
Deficits passed to `bucketof` are already in range, so compute the
index without clamping.

Assisted-by: Claude Opus (claude-opus-5) <noreply@anthropic.com>
Certify returned hard covers in `iscover` arithmetic by uniformly
inflating factors for the worst rounding shortfall. Leave initializer
starts unchanged.

Assisted-by: Claude Opus (claude-opus-5) <noreply@anthropic.com>
Record each continuation stage's exit reason and final decrease;
warn when it reaches `maxiter` while still descending.

Assisted-by: Claude Opus (claude-opus-5) <noreply@anthropic.com>
Build working-precision schedules ending at `1e8`: eight stages
for exact solvers and four for `:lsqr`. An explicit `κs` overrides
the default.

Assisted-by: Claude Opus (claude-opus-5) <noreply@anthropic.com>
Start LSQR continuation from the heuristic cover; exact solvers
retain the unweighted start. An empty schedule still returns the
unweighted fit.

Assisted-by: Claude Opus (claude-opus-5) <noreply@anthropic.com>
Cache one log magnitude per support entry across heuristic sweeps
while preserving traversal order and results. The dense-grid path
is unchanged.

Assisted-by: Claude Opus (claude-opus-5) <noreply@anthropic.com>
Match `SparseMatrixCSC` symmetry partners with per-column cursors in
O(nnz), preserving generic-check behavior for zeros and roundoff.

Assisted-by: Claude Opus (claude-opus-5) <noreply@anthropic.com>
Right-precondition `Float64` LSQR with a reusable sparse Cholesky
factor of the weighted normal matrix. A ridge handles singular
support graphs.

Assisted-by: Claude Opus (claude-opus-5) <noreply@anthropic.com>
Flatten support into compact row, column, and log-magnitude arrays,
using a SIMD logarithm approximation. Preserve traversal order and
certify returned covers in linear arithmetic.

Assisted-by: Claude Fable 5 (claude-fable-5) <noreply@anthropic.com>
Use CHOLMOD's symbolic fill estimate to cap Cholesky preconditioner
storage at `fillbudget`. Fall back to diagonal preconditioning and
report the selected regime in the statistics.

Assisted-by: Claude Opus (claude-opus-5) <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.95288% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.92%. Comparing base (c715d16) to head (dfd77f7).

Files with missing lines Patch % Lines
src/minimal_covers.jl 98.52% 4 Missing ⚠️
src/sparse_support.jl 90.90% 3 Missing ⚠️
src/iscover.jl 97.10% 2 Missing ⚠️
src/fastlog.jl 95.23% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #51      +/-   ##
==========================================
+ Coverage   98.39%   98.92%   +0.52%     
==========================================
  Files          13       15       +2     
  Lines        2937     3643     +706     
==========================================
+ Hits         2890     3604     +714     
+ Misses         47       39       -8     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@timholy
timholy merged commit c127c5f into main Aug 25, 2026
5 checks passed
@timholy
timholy deleted the perf-constants branch August 25, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant