Skip to content

feat(bench): JIT arm — real baseline-vs-JIT break-even#11

Merged
Poytr1 merged 1 commit into
mainfrom
feat/aj-bench-jit-arm
Jul 6, 2026
Merged

feat(bench): JIT arm — real baseline-vs-JIT break-even#11
Poytr1 merged 1 commit into
mainfrom
feat/aj-bench-jit-arm

Conversation

@Poytr1

@Poytr1 Poytr1 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Completes Phase 3: aj bench --gen <shape> --compare runs a true baseline-vs-JIT comparison and reports break-even with real numbers.

What's here

  • SkilledFixture interface + NullCheckFixture.InstallSkill: writes a project-local .claude/skills/<name>/SKILL.md with the exact deterministic transform, so the JIT arm has the skill available (models "compiled from prior runs") — no global config touched, arms stay isolated.
  • Runner.Setup hook: runs once per (task, arm) before rollouts; the JIT arm uses it to install the skill.
  • runGenCompare: regenerates a fresh fixture per arm (baseline mutates the tree in place, so the JIT arm must start clean) across the --n sweep.
  • Verifier fix: scope the guard grep to *.go (--include='*.go') so the installed SKILL.md's example code can't inflate the count — a --dry-run caught a false JIT pass; regression test added.

Real result

Live claude, --gen nullcheck --n 2 --compare:

nullcheck-2: baseline 100% / jit 100%   (iso-accuracy, 2 guards each, verified)
   T2S baseline 235,695 vs jit 235,341, saving 354/use

Honest finding: on this trivial shape a project-local skill barely helps (~0.15%); baseline T2S is dominated by fixed context load. That's exactly the "is it actually worth it?" signal the benchmark exists to produce — with a real compile cost, break-even here is thousands of invocations.

golangci-lint clean; bench tests (incl. the contamination regression) green.

@Ilya_Sutskever — the iso-accuracy gate + fresh-per-arm + skill-install pipeline is complete. Curious whether you'd expect a bigger delta on a heavier shape (migrate-N with more exploration to skip), which would be the next fixture.

🤖 Generated with Claude Code

Completes Phase 3: `aj bench --gen <shape> --compare` now runs a true
baseline-vs-JIT comparison and reports break-even.

- SkilledFixture interface + NullCheckFixture.InstallSkill: writes a
  project-local .claude/skills/<name>/SKILL.md giving the exact
  deterministic transform, so the JIT arm has the skill available (models
  "compiled from prior runs") without touching global config.
- Runner.Setup hook: runs once per (task, arm) before rollouts; the JIT
  arm uses it to install the skill.
- runGenCompare: regenerates a FRESH fixture per arm (baseline mutates the
  tree in place, so the JIT arm must start clean) across the --n sweep.
- Verifier fix: scope the guard grep to *.go (--include='*.go') so the
  installed SKILL.md's example code can't inflate the count — caught by a
  --dry-run showing a false JIT pass; regression test added.

Verified with live claude: nullcheck n=2, both arms 100% at iso-accuracy
(2 guards each, verified), T2S baseline 235695 vs jit 235341 (saving
354/use). Honest result — on this trivial shape a project-local skill
barely helps; baseline T2S is dominated by fixed context load. Exactly
the kind of "is it actually worth it" signal the benchmark exists to give.

Refs: benchmark sandbox design §3.2/§4, Phase 3.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Poytr1 Poytr1 merged commit 4e355b8 into main Jul 6, 2026
2 checks passed
@Poytr1 Poytr1 deleted the feat/aj-bench-jit-arm branch July 6, 2026 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant