DOC: Add the bind fast-path task note to devnotes - #270
Merged
Merged
Conversation
The working instruction that PR #269 was implemented from, filed verbatim alongside IOSpecLiteralTask.md and CoreRefactorDesign.md. Renamed from BIND-FASTPATH-PLAN.md to match the directory's convention. It records what the implementation cannot: the measurements that motivated the change, the decision table behind the guard, the two traps that only adversarial review found (find_match passing a list, and ParamFunc.__slots__ shadowing the base tuple), and the approaches ruled out so they are not retried. Co-Authored-By: Claude Opus 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.
Files the working instruction that #269 was implemented from, alongside
IOSpecLiteralTask.mdandCoreRefactorDesign.md. Renamed fromBIND-FASTPATH-PLAN.mdto match the directory's CamelCase convention; the content is verbatim.Docs only — no code changes.
Why keep it
It records what the implementation cannot:
lifelib-productsmodels, and the finding that 99.999% of them enter atCellsImpl.callrather thanCells.__call__, which is why the fast path is inget_node()and not at the obvious call site.POSITIONAL_ONLYdoes not need excluding.find_match()passing a list rather than a tuple, andParamFunc.__slots__ = ()shadowing the base tuple so_copy_othercopied nothing. Neither is exercised by the 15.9M-call workload, so measurement alone would never have surfaced them.lru_cacheon_bind_args, caching bound keys per(args, kwargs), consultingobj.databefore the key exists, and putting the guard inside_bind_args.Where it differs from what landed
Two deliberate deviations, both recorded in 58f2aef's commit message rather than edited into the note:
_bind_tailsalso fast-paths default-reliant short calls, which §3 marks as slow-path. That took the measured hit rate from the note's 99.22% to 100.00%.ParamFuncquestion was resolved by fixing_copy_otherto iterateFormula.__slots__, not by documenting the exception.🤖 Generated with Claude Code