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
34 changes: 17 additions & 17 deletions .github/workflows/release-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
release-baseline:
needs: validate-release
runs-on: ubuntu-latest
# 2 min checkout + 90 min shared setup + 150 min comparative + 90 min exact
# 2 min checkout + 60 min shared setup + 140 min default + 130 min exact
# + 18 min for the tail and runner overhead; below the hosted 360 min limit.
timeout-minutes: 350
env:
Expand All @@ -82,30 +82,30 @@ jobs:

- name: Prepare release benchmarks
# One parent timeout bounds all nested installs, validation, and inventory.
timeout-minutes: 90
timeout-minutes: 60
uses: ./.github/actions/prepare-release-benchmarks # zizmor: ignore[self-repository] actionlint 1.7.12 does not accept $/...
with:
validated-attempt: ${{ needs.validate-release.outputs.validated-attempt }}

- name: Save comparative Criterion baseline
- name: Save default-feature Criterion baseline
id: comparative
timeout-minutes: 150
timeout-minutes: 140
run: |
set -euo pipefail
echo "[release-baseline] vs_linalg started $(date -u +%FT%TZ); budget 150 min"
date +%s > target/vs_linalg-started
just bench-save-baseline "$RELEASE_TAG" vs_linalg
date +%s > target/vs_linalg-finished
echo "[release-baseline] public-default started $(date -u +%FT%TZ); budget 140 min"
date +%s > target/public-default-started
just bench-save-baseline "$RELEASE_TAG" public-default
date +%s > target/public-default-finished

- name: Save exact Criterion baseline
id: exact
timeout-minutes: 90
timeout-minutes: 130
run: |
set -euo pipefail
echo "[release-baseline] exact started $(date -u +%FT%TZ); budget 90 min"
date +%s > target/exact-started
just bench-save-baseline "$RELEASE_TAG" exact
date +%s > target/exact-finished
echo "[release-baseline] public-exact started $(date -u +%FT%TZ); budget 130 min"
date +%s > target/public-exact-started
just bench-save-baseline "$RELEASE_TAG" public-exact
date +%s > target/public-exact-finished

- name: Validate complete release dataset
run: just bench-release-check "$RELEASE_TAG"
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
echo ""
echo "| Suite | Outcome | Elapsed seconds | Budget minutes |"
echo "| --- | --- | --- | --- |"
for suite in vs_linalg exact; do
for suite in public-default public-exact; do
elapsed="not started"
if [[ -f "target/$suite-started" ]]; then
end="$(date +%s)"
Expand All @@ -151,10 +151,10 @@ jobs:
elapsed="$((end - $(cat "target/$suite-started")))"
fi
outcome="$COMPARATIVE_OUTCOME"
budget=150
if [[ "$suite" == exact ]]; then
budget=140
if [[ "$suite" == public-exact ]]; then
outcome="$EXACT_OUTCOME"
budget=90
budget=130
fi
echo "| $suite | $outcome | $elapsed | $budget |"
done
Expand Down
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ required-features = [ "exact" ]
name = "rational_input_5x5"
required-features = [ "exact" ]

[[bench]]
name = "public_api"
harness = false
required-features = [ "bench" ]

[[bench]]
name = "angle"
harness = false
Expand Down
6 changes: 6 additions & 0 deletions benches/exact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,12 @@ fn bench_canonical_conversion<const D: usize>(c: &mut Criterion) {
group.bench_function("rounded_result", |b| {
b.iter(|| black_box(black_box(&input).to_rounded_f64()));
});
group.bench_function("strict_array", |b| {
b.iter(|| black_box(black_box(input.as_array()).try_to_f64()));
});
group.bench_function("rounded_array", |b| {
b.iter(|| black_box(black_box(input.as_array()).to_rounded_f64()));
});
group.finish();
}
}
Expand Down
Loading
Loading