XPerf — what else (same playbook)
Derived from the closed loop: guide ↔ measured evidence ↔ corpus dogfood ↔ reverse-opt ↔ impl in the target language ↔ honest limits.
Already proven (keep)
- Same-language checkers (Zig / C / JS) + self-lint = 0.
- Corpus reverse-opt improves precision, not app speed by itself.
- Static smell ↔ runtime: partial (jsperf STATIC-VS-V8; cperf STATIC-VS-O2); must re-validate per rule family.
- Cross-kit catalog: smell-catalog.md.
- Engine corpora (gcc/Node) are weak as “find speedups”; strong as FP mills.
High leverage next
1. Finding → bench gate (jp-delete-shape / jp-delete-array-hole / cp-alloc-hot done)
Every kept rule needs ≥1 fixture pair with JSONL before/after on a named runtime (cc -O2 / Node version / Zig ReleaseFast).
Ship as packages/*/evidence/<rule-id>.jsonl + guide citation.
Until then, treat lint as review prompt only (already true; make it mechanical).
2. Severity / modes (done in cperf/jsperf)
error: only rules with measured agreement (e.g. jsperf jp-delete-array-hole, cperf cp-alloc-hot).hint/ off-by-default: cp-printf-hot, jp-console-hot, jp-alloc-hot.- Profiles:
--preset app|engine|all+--severity RULE=…+--strict-hints.
3. Dynamic companions (not more static rules)
| Kit | Companion | Purpose |
|---|---|---|
| jsperf | --trace-deopt / Perf harness (started) | JIT truth |
| cperf | perf stat / cachegrind wrapper on examples | I/O vs alloc myths |
| zperf | existing benches + tracy optional | keep |
| jvmperf | JMH + EaProbe / STATIC-VS-HOTSPOT (started) | HotSpot wall-clock & B/op; not PrintCompilation counts |
Static answers “might hurt”; dynamic answers “did hurt here”.
4. Own hot code, not only upstream engines
Point corpora at user/product trees (and mini-program / embed JS for jsperf). Success metric: actionable TPs with benches, not residual count ↓.
5. Cross-kit “same smell, three languages” (catalog landed)
See smell-catalog.md. Fill empty cells (C layout rules) as rules appear. Forces honest portability claims (V8 ≠ QuickJS ≠ C).
6. jvmperf slot
Landed under packages/jvmperf/ (jvmperf-lint, guides, JMH). Evidence gate + correlate: docs/evidence-policy.md.
7. CI dogfood
make self-lint / npm run self-lint / zig build on PR; corpus lint nightly on pinned SHAs (not every commit).
8. Negative results as first-class docs
Publish negatives as first-class docs — jsperf STATIC-VS-V8 + cperf STATIC-VS-O2 (#if 0 cp-printf-hot) done; keep extending.
Explicit non-goals (for now)
- Full AST/typechecker-grade analysis.
- Claiming engine lint totals = performance wins.
- Detecting JIT tier / IC state from source alone.
Suggested order
Severity split + app preset (c/js)— done.Evidence JSONL for jp-delete-shape / jp-delete-array-hole / cp-alloc-hot— done; see each kit'sevidence/.- One product/embed corpus instead of more gcc.
cperf static vs— done (correlation suite kept outside the repo).-O2Cross-kit smell catalog stub— done: smell-catalog.md; fill remaining evidence cells.- Dynamic companions (
perf staton cperf examples).