You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #137: investigate LDLT factorization performance now that Matrix<D> and Vector<D> carry the finite-entry invariant directly and public solve APIs use the clean solve name.
Current State
The #137 finite-proof API cleanup improved la-stack rows versus the v0.4.2 Criterion baseline, including vector kernels and LU paths. The remaining consistent performance gap is LDLT factorization:
Ldlt::solve after factorization is often competitive, especially for repeated solves.
Ldlt factorization itself trails nalgebra/faer in the vs_linalg suite, with the gap becoming more visible as D grows.
LU factorization and LU solve paths look healthier, so this should remain focused on LDLT rather than revisiting the finite-proof API.
Proposed Changes
Investigate the LDLT factorization kernel for avoidable overhead while preserving the current correctness and API invariants:
Keep Matrix<D> / Vector<D> finite by construction.
Do not expose public unchecked constructors or public FiniteMatrix / FiniteVector types.
Do not reintroduce solve_vec; public factorization solves should remain solve.
Inspect the LDLT update loops, symmetry handling, and finite internal wrapper path for redundant work.
Prefer improvements that preserve stack allocation and const-generic fixed dimensions.
Prioritize D=2 through D=16; D=32 and D=64 are informative but outside the crate's core performance target.
Keep error behavior unchanged: non-finite raw input is rejected at construction, while LDLT reports computed non-finite intermediates and singular/not-positive-semidefinite conditions as typed LaError variants.
Summary
Follow-up to #137: investigate LDLT factorization performance now that
Matrix<D>andVector<D>carry the finite-entry invariant directly and public solve APIs use the cleansolvename.Current State
The #137 finite-proof API cleanup improved la-stack rows versus the v0.4.2 Criterion baseline, including vector kernels and LU paths. The remaining consistent performance gap is LDLT factorization:
Ldlt::solveafter factorization is often competitive, especially for repeated solves.Ldltfactorization itself trails nalgebra/faer in thevs_linalgsuite, with the gap becoming more visible as D grows.Proposed Changes
Investigate the LDLT factorization kernel for avoidable overhead while preserving the current correctness and API invariants:
Matrix<D>/Vector<D>finite by construction.FiniteMatrix/FiniteVectortypes.solve_vec; public factorization solves should remainsolve.Benefits
Implementation Notes
benches/vs_linalg.rsas the primary performance signal.LaErrorvariants.Related: #137