Uh oh!
There was an error while loading. Please reload this page.
docs(rules): record where per-test time actually goes - #1190
Merged
Conversation
Measured: a test costs ~7.8ms and an assertion ~0.15ms, so a test is worth about 50 assertions. That is why #801-#851 went after per-test forks and not the assertion layer, and it says assertion micro-optimization is not worth doing. Three explanations checked and ruled out, so nobody re-checks them: a 30-binary PATH-shim census counts 12 forks for 500 tests, a bare $( ) is ~0.46ms (about 6% of the per-test cost), and per-test cost is 7.17ms at 100 tests against 8.06ms at 1000 -- +12% over a 10x range, so #830 still holds. No win found in this pass. The numbers are the deliverable: they give a regression signal for #830 and save the next attempt from re-deriving them. Closes#1189
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 freeto 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.
🤔 Background
Related #1189
assert_sameA test costs ~50x an assertion, which is why #801–#851 targeted per-test forks
and not the assertion layer.
💡 Changes
Records the profile in
.claude/rules/perf-fork-budget.md, including threeexplanations that were checked and ruled out:
$( )is ~0.46 ms, ~6% of the 7.8 msNo optimization was found in this pass. The numbers are the deliverable:
they rule out assertion micro-optimization, give a regression signal for #830,
and stop the next attempt re-deriving them.