cs: the batch density model counts delegation truthfully (#214) - #236
Merged
Conversation
Two holes from the #208 review, both now closed: TFixed and the 128-bit family score as delegated sites (every WriteBatch.SerializeFixed/ Int128/UInt128 overload Sync/Recaptures — they were counted as plain scalars), and densityUnion's bulk count is the max over arms taken separately (the b==0 entry gate asks whether a delegated site CAN run in the body; a light arm carrying a string answers yes even under a heavier scalar-dense sibling). Consequence: the entry-batch gate now refuses the delegating shapes it was admitting through the holes — RealWorld's RealPacket and the ludicrous fixed/128 types lose batched entries (16 batch cores retracted across write+read). The measured surface is untouched by construction: generated/bench/cs BenchMixed does not change, and a quick cs leg on this branch reproduces the sitting-2 rates (round_trip 1.603M vs 1.586-1.594M, within noise) with the wire gate and the zero-alloc gate green. 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.
Closes #214 (the #208 review's finding §6).
densityFieldscoresTFixedand 128-bit integers as delegated sites (their WriteBatch overloads all Sync/Recapture);densityUnionreturns max bulk over arms taken separately, so a light arm carrying a delegating field is no longer hidden by a heavier scalar arm. Theb == 0entry ruling from #208 now rests on a true count.Effect: 16 batch cores retracted across the ludicrous fixed/128 shapes and RealWorld's RealPacket — exactly the shapes the review listed as admitted-through-the-holes.
BenchMixed's generated code is byte-unchanged, so the headline rows cannot move by construction; a quick cs leg on the branch reproduces sitting-2 rates within noise with wire and zero-alloc gates green. Goldens re-pinned (ludicrous cs only).🤖 Generated with Claude Code