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
18 changes: 15 additions & 3 deletions .claude/skills/benchmark/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ runs in both, so its two results show how much the machine moved. Heavy runs go
Check `git merge-base --is-ancestor <sha> HEAD` for both refs after the history merges. The #353 benchmark
baseline and candidate were built on independent branches, so merging only the candidate left the baseline
missing from every runner checkout (44333395182).
- **Compare a series of steps with the previous main, not only each step with its base.** Every #355 step was
judged against the step before it, mostly on large collections, and each added a little fixed cost per collection;
the A/B of the whole branch against main then found SimpleClass serialize 1.44-1.60, AppData Players 1.75-2.5 and
WorkloadTest's serialize cases 1.3-1.9 on every x64 runner (run 44979508452), from collections of 1 to 3 strings
inside the objects (a top-level `Dictionary<int, string>` of one entry +30 ns, 1.8x; 1,000 elements on par or
faster), built up over #409, #412, #423 and #427. Time a run-path change at 1, 3, 32 and 1,000 elements and against
the last main, and run the branch's A/B against main before its pull request, early enough to fix what it finds.
When head's benchmark project needs packages main lacks, base is main plus head's
`runtimes/csharp/Directory.Packages.props` in one commit (bcc00f8f: LuminPack 2.0.0-rc.2), reached as above.
- **Time the Nino.Core build you mean.** BenchmarkDotNet's runner project (`Nino.Benchmark-<job>`) gets Nino.Core
only through Nino.Benchmark's references, so a referenced package built for fewer frameworks than Nino.Core brings
an older build into it: until f01a8d3c Nino.Immutable (net8.0 only) made every runner process load Nino.Core's
Expand Down Expand Up @@ -136,9 +145,12 @@ runs in both, so its two results show how much the machine moved. Heavy runs go
decide a question (narrow filters, one floor per base shared by everyone, repeats only for a verdict). The
workflows cap themselves (`max-parallel` 10 runtime, 8 .NET jobs); cancelling and re-running from a session
returns 403, so a run started is a run spent: 8 queued runtime runs of 25 lines (250 jobs each) once blocked every
other workflow for hours. The whole .NET suite in one line, `*Test.Nino*` (128 cases, quick), takes about 24
minutes a round on every runner: 5 rounds are 2 hours a job, and an A/B line, its floor and a second Neoverse line
took 6 h 17 min (run 41364890698); a filter of 13 cases at 12 rounds took 2 hours (41399172268).
other workflow for hours. The whole .NET suite in one line, `*Test.Nino*`, took about 24 minutes a round at 128
cases (5 rounds 2 hours a job; an A/B line, its floor and a second Neoverse line 6 h 17 min, run 41364890698); at
326 cases (rc.11) one side of a round takes about 33 minutes on an EPYC 9V74, so 3 rounds are 3 h 20 min a job, and
two lines on `cpu='EPYC|Xeon|Neoverse'` made 27 jobs that ran for more than 7 hours (run 44979508452). Split the
suite across lines by class, or take 2 rounds, when the question allows; a filter of 13 cases at 12 rounds took 2
hours (41399172268).
- **Skip an A/B whose code is unchanged** (identical generated files or machine code prove it), and prove it per
runtime before requesting the line: Go, `go test -c` the bench at both commits and diff `go tool objdump` with
paths and addresses stripped; in TypeScript, diff each revision's benchmark harness, `src/nino.ts`, and the
Expand Down
8 changes: 8 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ reusing is written down before the task ends, in the same series of commits as t
way through public seams; standard practice over a new mechanism. The standard is stated in `audit-code`; for
collections it is one storage layer and one devirtualized loop per element kind over `<T, TFormatter>`, reads and
writes, a composite (a pair, a tuple, a generic struct) composed from its items, never a loop shape of its own (`optimize`).
Generated code only composes calls of those kernels: unifying or simplifying it never changes which kernels run or
in what order, and speed comes from three places only, a cheaper composition, faster kernels, and generated code the
JIT compiles well (everything inlined, state in registers, no per-element `static readonly`, one length check, cold
paths out of line) (the owner's rule, #355).
5. **Proven.** Tests for behavior, the machine code for hot paths, runner numbers for speed (`benchmark`).

## Rules
Expand Down Expand Up @@ -193,6 +197,10 @@ reusing is written down before the task ends, in the same series of commits as t
when the owner asks), after the pull request's CI is green. A contributor's pull request is reviewed against
`feature`; fix it on their branch where maintainers may push, otherwise merge it into ours with their commits kept,
so it shows as merged once ours lands. The test branch moves only by merge. No force push, never trigger a release.
- **Work in progress is pushed.** Commit unfinished work and push it to its working branch at each meaningful point
and before a session or an agent stops, so another session can continue it (the owner's rule): a normal
Conventional subject whose summary starts with `WIP:`, a body that says what is done, measured and left, and a tree
that builds. A WIP commit lands on `main` only after the work is finished and its branch passes `verify`.
- **Shell**: never bare `git stash`, `pkill -f` or `pgrep -f`; heavy commands (builds, tests, benchmarks, cargo) run
under `flock -o /tmp/nino-heavy.lock` when agents share the machine; scratch files stay out of the repository.
Remove each experiment's worktree and temporary builds once its timing is done (keep uncommitted source changes,
Expand Down
Loading