Repository navigation
Reuse bounded matcher output capacities across batches - #1050
Merged
Merged
Conversation
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.
Reuse matcher output buffers within bounded retained capacities instead of reallocating them for every batch. A repeated 64-entry output batch uses 20% fewer allocation calls and about 25% fewer requested bytes on both macOS and Linux, while preserving output and error behavior.
AG;DR
Result ownership and reset contract
ParallelResultslots. Workers mutate only their exclusively claimed private slot; the private entry evaluator receives its index and writes the pool's own state directly.min(64 KiB, 1 MiB / current batch size). Shrinking/empty batches destroy truncated tails.Qualification and rejected controls
The committed decision report at
docs/benchmarks/bounded-match-results-20261102.mdand its lossless archive retain all source variants, source/executable hashes, fixture definitions, raw repetitions, scripts, allocation counters, and verification logs.Four variants separate the mechanisms: baseline, direct writes while clearing/recreating records, bounded matcher reuse, and comparison-vector retention only. Adopt bounded matcher reuse. Reject the reset-only change as a separate optimization because it saves no output allocations. Reject comparison-vector retention: VFS range reads still return fresh owning strings, and keeping old result slots can prolong old small patch payloads without reusing their input buffers.
Validation
Update
TODO.md,docs/performance-analysis.md,CHANGELOG.md, and the release-site report mapping together. The exact evidence archive gets a narrow large-file-hook exception alongside the existing reports.Based on merged #1049. The measured parent
8d96bc90fea5adb469b42e5e34a8be6a518f0f4band merged main901c8fea916124f4d0e195c5385f2a977b44093dhave identical trees; the unpublished branch was synchronized before committing. O11 active-worker participation and budget-aware comparison source reuse remain separate.