Skip to content

perf: reduce checked determinant query overhead - #209

Merged
acgetchell merged 1 commit into
mainfrom
perf/190-determinant-throughput
Aug 12, 2026
Merged

perf: reduce checked determinant query overhead#209
acgetchell merged 1 commit into
mainfrom
perf/190-determinant-throughput

Conversation

@acgetchell

@acgetchell acgetchell commented Aug 12, 2026

Copy link
Copy Markdown
Owner
  • Aggregate D≥5 range proofs before a single cold scaled replay.
  • Preserve immediate small-dimension fallback and range-safe determinant behavior.

Closes #190

Summary by CodeRabbit

  • Bug Fixes

    • Improved determinant calculations for LU and LDLT decompositions, especially for matrices with very small or large values.
    • Enhanced handling of numerical range limits to help preserve accurate results across different matrix sizes.
  • Refactor

    • Streamlined internal product and scaling result handling without changing the public API.
  • Chores

    • Updated the pinned formatting and validation tool version.

- Aggregate D≥5 range proofs before a single cold scaled replay.
- Preserve immediate small-dimension fallback and range-safe determinant behavior.

Closes #190
@acgetchell acgetchell self-assigned this Aug 12, 2026
@acgetchell
acgetchell enabled auto-merge August 12, 2026 08:15
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2eb7d41c-fe1c-47fa-b495-e835f2b1174a

📥 Commits

Reviewing files that changed from the base of the PR and between 32e67d4 and 2bdf1d3.

📒 Files selected for processing (4)
  • justfile
  • src/ldlt.rs
  • src/lu.rs
  • src/scaled_product.rs

📝 Walkthrough

Walkthrough

The change replaces the range-check enum with a product-plus-proof struct. LU and LDLT determinant paths use the new accessors and dimension-specific fallback behavior. The Justfile updates the pinned rumdl version.

Changes

Determinant range safety

Layer / File(s) Summary
Range-check result contract
src/scaled_product.rs
RangeCheckedProduct now stores the product and range-preservation status. Accessors and tests cover normal, underflow, overflow, and boundary cases.
LU and LDLT determinant consumers
src/lu.rs, src/ldlt.rs
Lu::det and Ldlt::det consume the new result API. Small dimensions fall back immediately on range loss; larger dimensions defer the fallback until accumulation completes.

Tooling pin

Layer / File(s) Summary
rumdl version pin
justfile
The pinned rumdl version changes from 0.2.52 to 0.2.53.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant LuDet as Lu::det
  participant LdltDet as Ldlt::det
  participant RangeCheck as range_checked_product
  participant Scaled as ScaledProduct
  LuDet->>RangeCheck: multiply accumulator and factor
  RangeCheck-->>LuDet: product and range_preserved
  LdltDet->>RangeCheck: multiply accumulator and factor
  RangeCheck-->>LdltDet: product and range_preserved
  LuDet->>Scaled: use scaled accumulation after unsafe result
  LdltDet->>Scaled: use scaled accumulation after unsafe result
Loading

Possibly related PRs

Suggested labels: performance, rust

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The Justfile rumdl version update is unrelated to the determinant performance objectives in issue #190. Remove the rumdl pin update or move it to a separate pull request with its own justification.
Linked Issues check ❓ Inconclusive The Rust changes match the linked determinant optimization and preserve the described small-dimension fallback and range-proof behavior, but benchmark evidence is not provided. Provide same-command profiling, benchmark, and correctness results required by issue #190 before merge.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the determinant performance optimization and reduced checked-query overhead.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch perf/190-determinant-throughput

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.86%. Comparing base (32e67d4) to head (2bdf1d3).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #209      +/-   ##
==========================================
- Coverage   97.86%   97.86%   -0.01%     
==========================================
  Files           8        8              
  Lines        4975     5007      +32     
==========================================
+ Hits         4869     4900      +31     
- Misses        106      107       +1     
Flag Coverage Δ
unittests 97.86% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@acgetchell
acgetchell merged commit a94e698 into main Aug 12, 2026
19 checks passed
@acgetchell
acgetchell deleted the perf/190-determinant-throughput branch August 12, 2026 08:29
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.

Profile and restore checked factorization and determinant throughput

1 participant