Skip to content

cf-performance skill: lessons and tools from the PR #1798 session#1799

Merged
wmdietl merged 5 commits into
masterfrom
perf-skill-tooling
Jun 14, 2026
Merged

cf-performance skill: lessons and tools from the PR #1798 session#1799
wmdietl merged 5 commits into
masterfrom
perf-skill-tooling

Conversation

@wmdietl

@wmdietl wmdietl commented Jun 13, 2026

Copy link
Copy Markdown
Member

No description provided.

wmdietl and others added 5 commits June 13, 2026 11:02
SKILL.md:
- New "Removing a defensive copy" section: the defensive/cache-return copy is
  usually load-bearing (consumers mutate the result, so a boundary flip moves the
  copy rather than removing it); freeze-as-bug-finder to enumerate mutating
  consumers; when a freeze/assert flushes a cluster, suspect one shared copier bug
  before assuming pervasive aliasing; a benign latent aliasing bug may have no
  wrong-result symptom (needs a unit test or the enforcement that makes it observable).
- Two new habits: measure the addressable fraction before building a subset-only
  optimization (with the static-counter + shutdown-hook + -D-toggle recipe), and
  "count != cost".
- Deterministic-allocation section: settings=profile traces carry no TLAB
  attribution (use record-jfr.sh's JFC for that), and the deterministic reader is
  blind to pure-CPU/traversal wins; points at the new ab-measure.sh driver.

Tools:
- gen-sized-program.py gains a --shape flag (generic|vararg|deep-nesting|
  many-fields); vararg is what exposed the PR #1798 copier bug. Backward compatible.
- ab-measure.sh: A/B driver that runs each program N times and reports median
  allocation and median wall for the currently-built side.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@wmdietl wmdietl merged commit 37a1568 into master Jun 14, 2026
50 checks passed
@wmdietl wmdietl deleted the perf-skill-tooling branch June 14, 2026 01:58
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