Skip to content

The benchmark is measured after the library's set-up - #2191

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
the-benchmark-is-measured-after-the-librarys-set-up
Oct 28, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
the-benchmark-is-measured-after-the-librarys-set-up

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

The Kernel Benchmark gate failed twice today on unchanged library code: on #2187's first run, and on #2188 after its rebase. Each time SimplifyEasy, SolveEasy and EvalTrigPrecise took 3–12x their time, and SimplifyEasy allocated 3% more. Both re-runs matched the baseline to the byte.

BenchmarkDotNet times one call first, and when that call takes more than two thirds of its 500 ms iteration, it times one call per iteration from then on. The first call took 349–362 ms on the failing runs and 252–300 ms on the passing ones. It includes parsing the class's static expressions and the library's own set-up.

A [GlobalSetup] now does both before the timed call. Measured on one machine, master against this branch:

first call master this
SimplifyEasy 172 ms 8 ms
SolveEasy 164 ms 5 ms
EvalTrigPrecise 158 ms 45 ms
EvalEasy 133 ms 10 ms

Allocation is unchanged. SimplifyEasy is 79,682 B/op on both, and the largest move among gated benchmarks is ParseEasy, +0.11% (21 B/op). SolveHard, at 70 ms a call, is now timed one call per iteration instead of piloted, at 9,832,912 B/op against 9,831,370.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

The Kernel Benchmark gate failed twice today on unchanged library code: on #2187's first run, and
on #2188 after its rebase. Both times it was SimplifyEasy, SolveEasy and EvalTrigPrecise, at
3-12x their time, and SimplifyEasy at 3% more allocation. Their re-runs matched the baseline to the
byte.

BenchmarkDotNet times one call before it decides how to measure, and where that call takes more
than two thirds of its 500 ms iteration, it times one call per iteration from then on. The first
call of those three took 349-362 ms on the failing runs and 252-300 ms on the passing ones. For a
call of tens of microseconds, one call per iteration is another measurement. That first call paid
for parsing every static expression of the class and for the library's own set-up: EvalEasy, a
cache lookup, took 133 ms the first time on one machine.

A [GlobalSetup] now touches the class and runs one simplification, one solve and one evaluation
before the timed call. Measured on one machine, master against this, the first call drops from
172 to 8 ms (SimplifyEasy), 164 to 5 ms (SolveEasy) and 158 to 45 ms (EvalTrigPrecise). What the
gated benchmarks allocate is unchanged: SimplifyEasy is 79,682 B/op on both, and the largest move is
ParseEasy's +0.11% (21 B/op). The two compilation benchmarks, which the gate leaves out for their
own spread, moved -0.5% and +2.0%. SolveHard, a call of 70 ms, is now timed one call per iteration rather than
piloted, and allocates 9,832,912 B/op against 9,831,370.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet Rafael-SOWNet moved this from Todo to In review in AngouriMath Oct 28, 2026
@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.53%. Comparing base (5e7731f) to head (0ef4ab3).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2191      +/-   ##
==========================================
+ Coverage   86.52%   86.53%   +0.01%     
==========================================
  Files         297      297              
  Lines       66161    66324     +163     
  Branches    19237    19267      +30     
==========================================
+ Hits        57245    57395     +150     
- Misses       4851     4856       +5     
- Partials     4065     4073       +8     
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.09% <ø> (+0.01%) ⬆️
fsharp 32.97% <ø> (ø)
interactive 40.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 22 files with indirect coverage changes

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

@Rafael-SOWNet
Rafael-SOWNet merged commit 3f6c444 into master Oct 28, 2026
29 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in AngouriMath Oct 28, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the the-benchmark-is-measured-after-the-librarys-set-up branch October 29, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant