cf-performance skill: lessons and tools from the PR #1798 session#1799
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.