Repository navigation
A counter series at its cap trims without building a list - #3164
matrixarkai wants to merge 1 commit into
Conversation
3d1969a to
333e20c
Compare
|
Measured BEFORE this change, on main at d301b20 (before any of the four lever PRs), release build, rustc 1.89.0, Counter increment at the cap versus below it (K=8, cap = E): at the cap 30.64 / 30.87 / 30.40 blocks for E=10 / 100 / 1000; below the cap 29.85 / 29.89 / 29.46. So a write at the cap costs about 0.8 to 1.0 blocks more, which is the victim list this change removes (the increment path trims once per write, and the block is due on about one in sixteen). |
See the pull request description for what moved and what was not measured. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
333e20c to
a340c48
Compare
Change
The trim to
control_state_max_sizecollected the keys to drop into aVec<u64>before removing them, so a series sitting at its cap allocated on every write to a new bucket (twice when the block was due). It now takes the oldest point off the front withpop_first, the same points in the same order.No durable byte, wire byte or answer changes: the points kept, the answer, the staged outcome and every written byte are unchanged.
Guards (no absolute calibration)
a_bounded_series_keeps_its_newest_points_whatever_the_write_order: ascending, descending, repeating and shuffled writes at a bound of 6, series compared with a model after every write.probe::a_write_at_the_cap_allocates_what_a_write_below_it_allocates(alloc-probe, ignored): the same new-bucket writes, block forced on both arms, at the cap versus far below it; the difference must be under 0.3 blocks.What was NOT done
No local build, test run or plant was run for this change: the shared build lock queue is more than twenty deep, so CI is the first compile. There is no before/after allocation table yet; a measurement run through the counting allocator is still queued and its table will be posted as a comment on this PR. Until then, the allocation claim above is from reading the code, not from a measurement. The plant (revert the change, the guard must fail) has also not been run.
🤖 Generated with Claude Code