Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
echo "::error::Dispatch with --ref $RELEASE_TAG and the matching tag input"
exit 1
fi
target="$(uvx --python 3.15 --from research-repo-tools==0.2.0 research-repo-tools \
target="$(uvx --python 3.15 --from research-repo-tools==0.2.2 research-repo-tools \
--root "$RUNNER_TEMP" performance release-draft "$GH_REPO" "$RELEASE_TAG" \
--commit "$GITHUB_SHA" --expected-title "$RELEASE_TAG" | jq -c .)"
echo "target=$target" >> "$GITHUB_OUTPUT"
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:

[[ "$RELEASE_ASSET" == "la-stack-${RELEASE_TAG}-criterion-baseline.tar.gz" ]] || exit 1
printf '%s\n' "$RELEASE_TARGET" > "$RUNNER_TEMP/release-target.json"
uvx --python 3.15 --from research-repo-tools==0.2.0 research-repo-tools \
uvx --python 3.15 --from research-repo-tools==0.2.2 research-repo-tools \
--root "$RUNNER_TEMP" performance release-upload "$GH_REPO" "$RELEASE_TAG" \
"$GITHUB_WORKSPACE/$RELEASE_ASSET" --target "$RUNNER_TEMP/release-target.json"

Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if the scope expands. Unrelated guides need not be loaded for every task.
| Module ownership, features, or file organization | [Code organization](docs/code_organization.md) |
| Setup, commands, or validation selection | [Contributor workflow](CONTRIBUTING.md#validation-workflow), [justfile](justfile), `just --list` |
| Benchmark execution or performance reports | [Benchmarking](docs/BENCHMARKING.md) |
| Python support scripts | [Scripts guide](scripts/README.md) |
| Python tooling and consumer tests | [Tooling guide](tooling/README.md) |
| Maintainer-requested release work | [Releasing](docs/RELEASING.md) |

## Priorities
Expand Down Expand Up @@ -218,7 +218,7 @@ Favor the invariant over a convenient edit or faster implementation.
Python scripts; never invoke `python` or `python3` directly.
- Use pytest, not unittest, and add type hints to new code.
- `just python-check` includes blocking type checking; all code must pass.
- Read the [Scripts guide](scripts/README.md) for maintenance rules and
- Read the [Tooling guide](tooling/README.md) for maintenance rules and
entry-point ownership.

## Project Context
Expand Down
20 changes: 10 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ clarity, and the fixed-dimension stack-allocation model.
Reusable Python development tooling has moved into
[`research-repo-tools`](https://github.com/acgetchell/research-repo-tools).
It is a development dependency for this repository's setup, validation,
maintenance, benchmark reporting, and release workflows. Local scripts retain
la-stack's scientific policy and remaining benchmark adapters; see the
[Scripts guide](scripts/README.md) for the ownership boundary.
maintenance, benchmark reporting, and release workflows. Static declarations
and native correctness gates retain la-stack's scientific policy; see the
[Tooling guide](tooling/README.md) for the ownership boundary.

Building and using `la-stack` as a Rust library does not require Python, `uv`,
or `research-repo-tools`. The setup below is for contributors working on this
Expand Down Expand Up @@ -39,12 +39,12 @@ change files. Run bare `just` for the complete generated command list, including
arguments and descriptions. The [command policy](docs/dev/docs.md#command-discovery-and-placement)
owns recipe naming and documentation placement.

Setup, tool checks, updates, changelog, and opt-in CodeRabbit review use the published `research-repo-tools==0.2.0` package,
Setup, tool checks, updates, changelog, and opt-in CodeRabbit review use the published `research-repo-tools==0.2.2` package,
locked in the `tooling` dependency group and included by `dev`. Normal setup
and CI install it from PyPI through `uv sync --locked --group dev`; a sibling
checkout is unnecessary. To upgrade it deliberately, review the exact
`tooling` and project runtime requirements and refresh `uv.lock` together, then run the consumer
integration tests and `just ci`. See the [Scripts guide](scripts/README.md#changelog-and-release-tooling)
integration tests and `just ci`. See the [Tooling guide](tooling/README.md#changelog-and-release-tooling)
for the retained changelog policy and ownership boundary.

The shared setup contract requires an existing uv and does not generate bootstrap
Expand Down Expand Up @@ -288,7 +288,7 @@ Use the existing canonical documents instead of duplicating their guidance:
| Mathematical basis and numerical validity | [`docs/mathematical_basis.md`](docs/mathematical_basis.md) |
| Package metadata, features, and dependencies | [`Cargo.toml`](Cargo.toml) |
| Commands and validation workflow | [`justfile`](justfile), `just --list` |
| Python support tooling | [`scripts/README.md`](scripts/README.md) |
| Python support tooling | [`tooling/README.md`](tooling/README.md) |
| Benchmark methodology and baselines | [`docs/BENCHMARKING.md`](docs/BENCHMARKING.md) |
| Coverage workflow and reports | [`docs/MEASURING_COVERAGE.md`](docs/MEASURING_COVERAGE.md) |
| Citations and bibliography | [`CITATION.cff`](CITATION.cff), [`REFERENCES.md`](REFERENCES.md) |
Expand Down Expand Up @@ -339,10 +339,10 @@ for before-and-after measurements. The local release comparison is:
just performance-local
```

It writes `target/bench-reports/performance.md` without changing committed
release documentation or requiring a version bump. Staged and unstaged changes
to tracked files participate; untracked files are excluded, so stage any new
benchmark-relevant file first. Treat regressions as design feedback. If a
It writes `target/bench-reports/full/report.md` without changing committed
Comment thread
acgetchell marked this conversation as resolved.
Resolved
release documentation or requiring a version bump. Tracked changes and
nonignored untracked regular files participate; keep scratch output under
ignored `target/`. Treat regressions as design feedback. If a
slowdown is intentional, explain the correctness, API clarity, or composability
benefit that justifies it.

Expand Down
72 changes: 37 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -453,13 +453,46 @@ cargo run --locked --example vector_angles

## 📈 Benchmarks (vs nalgebra/faer)

<!-- BENCHMARKS:BEGIN -->

![LU solve (factor + solve): median time vs dimension][lu-solve-benchmark]

Raw data:
[docs/assets/bench/vs_linalg_lu_solve_median.csv](https://github.com/acgetchell/la-stack/blob/v0.5.0/docs/assets/bench/vs_linalg_lu_solve_median.csv)
Measurement provenance:
[docs/assets/bench/vs_linalg_lu_solve_median.provenance.json][benchmark-provenance]

[benchmark-provenance]: https://github.com/acgetchell/la-stack/blob/v0.5.0/docs/assets/bench/vs_linalg_lu_solve_median.provenance.json
[lu-solve-benchmark]: https://raw.githubusercontent.com/acgetchell/la-stack/v0.5.0/docs/assets/bench/vs_linalg_lu_solve_median.svg

Run: `634bc9527c2caf0a431a9bdfac082c190e1094f0b29eb6e3f28c4b96961cdec5`. Statistic: median. Unit: ns.

- la-stack (v0.5.0): current phase, v0.5.0, revision 51868ea4725c1a4790bba4c59341d2113b18b2bb.
- nalgebra (0.35.0): baseline phase, v0.4.6, revision 0215e65763f8eecb4bcad8bf29de4aca67531aa1.
- faer (0.24.4): baseline phase, v0.4.6, revision 0215e65763f8eecb4bcad8bf29de4aca67531aa1.

| Dimension | la-stack | nalgebra | faer | Speedup vs nalgebra | Speedup vs faer |
| --- | --- | --- | --- | --- | --- |
| 2 | 2.10359<br>[2.08908, 2.11912] | 4.53894<br>[4.53141, 4.54661] | 154.45<br>[153.658, 155.846] | 2.15771× | 73.4219× |
| 3 | 9.93879<br>[9.92881, 9.95117] | 32.9342<br>[32.8554, 33.057] | 191.85<br>[191.206, 192.814] | 3.3137× | 19.3032× |
| 4 | 21.7341<br>[21.7035, 21.776] | 55.0106<br>[54.9217, 55.0615] | 221.887<br>[221.678, 222.673] | 2.53107× | 10.2091× |
| 5 | 49.1031<br>[49.0318, 49.1659] | 74.629<br>[74.3476, 74.9906] | 272.864<br>[272.009, 273.512] | 1.51984× | 5.55695× |
| 8 | 133.665<br>[133.426, 133.861] | 166.317<br>[166.02, 166.604] | 374.912<br>[372.746, 376.096] | 1.24429× | 2.80487× |
| 16 | 750.027<br>[649.969, 761.453] | 589.011<br>[586.474, 592.341] | 938.943<br>[932.02, 944.127] | 0.78532× | 1.25188× |
| 32 | 2829.62<br>[2819.66, 2837.22] | 2722.74<br>[2720.98, 2729.21] | 3023.87<br>[3017.73, 3030.19] | 0.962229× | 1.06865× |
| 64 | 18280.4<br>[18138, 18489.9] | 13835.1<br>[13822.9, 13852.2] | 12678.8<br>[12660.2, 12699.3] | 0.756828× | 0.693573× |

Median time in ns; brackets show the lower and upper bounds of the **95% confidence interval**.
Speedups are ratios of point estimates; no ratio intervals or significance claims are inferred.

Selection coverage:

- la-stack (v0.5.0): 8 selected; 0 unavailable rows; 437 phase cases omitted. Complete evidence is retained independently.
- nalgebra (0.35.0): 8 selected; 0 unavailable rows; 789 phase cases omitted. Complete evidence is retained independently.
- faer (0.24.4): 8 selected; 0 unavailable rows; 789 phase cases omitted. Complete evidence is retained independently.

<!-- BENCHMARKS:END -->

Representative benchmark: `lu_solve` factors the matrix and solves one
right-hand side. Median time is lower-is-better, and the “Speedup vs
nalgebra/faer” columns divide each peer's median by the la-stack median
Expand All @@ -472,9 +505,10 @@ correctness guarantees and invariants. Performance claims require comparable
before-and-after evidence using the same inputs, configuration, and environment.
This snapshot records the measured source state, available CPU model, operating system, Rust
toolchain, dependency lock and harness digests, Criterion command, and
correctness-gate result in the adjacent JSON sidecar. The publication workflow
requires complete canonical-dimension coverage and regenerates the CSV, SVG,
README table, and provenance together.
correctness-gate result in the linked evidence. The publication workflow
requires complete canonical-dimension coverage and publishes the CSV, SVG,
README table, and evidence links together. Original plot-provenance sidecars
remain available as frozen records.

For the full per-kernel comparison methodology, algorithm citations, input
construction, and release-comparison workflow details, see
Expand All @@ -498,36 +532,6 @@ products and covers both well-separated and inconclusive dot/affine-difference
filters at D=4. Run it with `just bench-linear-form`; exact small-integer fixture
expectations are validated outside the timed closures.

<!-- BENCH_TABLE:lu_solve:median:new:BEGIN -->

Run: `634bc9527c2caf0a431a9bdfac082c190e1094f0b29eb6e3f28c4b96961cdec5`. Statistic: median. Unit: ns.

- la-stack (v0.5.0): current phase, v0.5.0, revision 51868ea4725c1a4790bba4c59341d2113b18b2bb.
- nalgebra (0.35.0): baseline phase, v0.4.6, revision 0215e65763f8eecb4bcad8bf29de4aca67531aa1.
- faer (0.24.4): baseline phase, v0.4.6, revision 0215e65763f8eecb4bcad8bf29de4aca67531aa1.

| Dimension | la-stack | nalgebra | faer | Speedup vs nalgebra | Speedup vs faer |
| --- | --- | --- | --- | --- | --- |
| 2 | 2.10359<br>[2.08908, 2.11912] | 4.53894<br>[4.53141, 4.54661] | 154.45<br>[153.658, 155.846] | 2.15771× | 73.4219× |
| 3 | 9.93879<br>[9.92881, 9.95117] | 32.9342<br>[32.8554, 33.057] | 191.85<br>[191.206, 192.814] | 3.3137× | 19.3032× |
| 4 | 21.7341<br>[21.7035, 21.776] | 55.0106<br>[54.9217, 55.0615] | 221.887<br>[221.678, 222.673] | 2.53107× | 10.2091× |
| 5 | 49.1031<br>[49.0318, 49.1659] | 74.629<br>[74.3476, 74.9906] | 272.864<br>[272.009, 273.512] | 1.51984× | 5.55695× |
| 8 | 133.665<br>[133.426, 133.861] | 166.317<br>[166.02, 166.604] | 374.912<br>[372.746, 376.096] | 1.24429× | 2.80487× |
| 16 | 750.027<br>[649.969, 761.453] | 589.011<br>[586.474, 592.341] | 938.943<br>[932.02, 944.127] | 0.78532× | 1.25188× |
| 32 | 2829.62<br>[2819.66, 2837.22] | 2722.74<br>[2720.98, 2729.21] | 3023.87<br>[3017.73, 3030.19] | 0.962229× | 1.06865× |
| 64 | 18280.4<br>[18138, 18489.9] | 13835.1<br>[13822.9, 13852.2] | 12678.8<br>[12660.2, 12699.3] | 0.756828× | 0.693573× |

Median time in ns; brackets show the lower and upper bounds of the **95% confidence interval**.
Speedups are ratios of point estimates; no ratio intervals or significance claims are inferred.

Selection coverage:

- la-stack (v0.5.0): 8 selected; 0 unavailable rows; 437 phase cases omitted. Complete evidence is retained independently.
- nalgebra (0.35.0): 8 selected; 0 unavailable rows; 789 phase cases omitted. Complete evidence is retained independently.
- faer (0.24.4): 8 selected; 0 unavailable rows; 789 phase cases omitted. Complete evidence is retained independently.

<!-- BENCH_TABLE:lu_solve:median:new:END -->

## 🤝 Contributing

See [CONTRIBUTING.md](https://github.com/acgetchell/la-stack/blob/main/CONTRIBUTING.md)
Expand Down Expand Up @@ -562,7 +566,6 @@ BSD 3-Clause License. See [LICENSE](https://github.com/acgetchell/la-stack/blob/

[audit-badge]: https://github.com/acgetchell/la-stack/actions/workflows/audit.yml/badge.svg
[audit-workflow]: https://github.com/acgetchell/la-stack/actions/workflows/audit.yml
[benchmark-provenance]: https://github.com/acgetchell/la-stack/blob/v0.5.0/docs/assets/bench/vs_linalg_lu_solve_median.provenance.json
[benchmarks-badge]: https://github.com/acgetchell/la-stack/actions/workflows/benchmarks.yml/badge.svg
[benchmarks-workflow]: https://github.com/acgetchell/la-stack/actions/workflows/benchmarks.yml
[clippy-badge]: https://github.com/acgetchell/la-stack/actions/workflows/rust-clippy.yml/badge.svg
Expand All @@ -573,7 +576,6 @@ BSD 3-Clause License. See [LICENSE](https://github.com/acgetchell/la-stack/blob/
[coverage-workflow]: https://github.com/acgetchell/la-stack/actions/workflows/codecov.yml
[dependabot-badge]: https://github.com/acgetchell/la-stack/actions/workflows/dependabot-auto-merge.yml/badge.svg
[dependabot-workflow]: https://github.com/acgetchell/la-stack/actions/workflows/dependabot-auto-merge.yml
[lu-solve-benchmark]: https://raw.githubusercontent.com/acgetchell/la-stack/v0.5.0/docs/assets/bench/vs_linalg_lu_solve_median.svg
[refs-det-bound]: https://github.com/acgetchell/la-stack/blob/main/REFERENCES.md#absolute-error-bound-for-closed-form-determinants
[refs-exact-sign]: https://github.com/acgetchell/la-stack/blob/main/REFERENCES.md#exact-determinant-sign-adaptive-precision-integer-arithmetic
[refs-exact-solve]: https://github.com/acgetchell/la-stack/blob/main/REFERENCES.md#exact-linear-system-solve-hybrid-bareiss--bigrational
Expand Down
Loading
Loading