Skip to content

perf: avoid redundant readback selection allocations - #1229

Open
spk-c wants to merge 2 commits into
fxceless:mainfrom
spk-c:submit/readback-selection
Open

spk-c wants to merge 2 commits into
fxceless:mainfrom
spk-c:submit/readback-selection

Conversation

@spk-c

@spk-c spk-c commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Stream flags directly into the selected-piece union, avoid temporary allocations, and reuse inflight ticket keys. Preserve forced-refetch counts, copy ranges, byte counts and synchronization. The synthetic parity regression covers 1,024 combinations.

Validation

All CI steps passed for this isolated change against the corrected test baseline in the fork: https://github.com/spk-c/victory-fork/actions/runs/45731809147.

This submission is a single commit rebased onto upstream a183ea2; exact-revision upstream CI is pending. Upstream's pre-existing CI failures are addressed separately in #1228. Draft pending baseline and upstream review. AI-assisted.

Refresh against upstream 52ac4ec

New head 6ca976192b1b33100cf4b9aaa6e39a57ed1ef469; the streamed selection versus two-pass selection regression passed. Clean isolated workspace Cargo Check and strict all-feature Clippy passed. Original commits are preserved. PR-only diff check passed. Full upstream CI approval and source-size policy fix #1357 remain pending.

Isolated contribution based on a183ea2. AI-assisted.
AI-assisted: keep original tested commit in history; local all-feature check, strict Clippy and focused synthetic tests passed. Upstream asset-policy baseline remains open (fxceless#1357).

Copy link
Copy Markdown

Alpha validation of tested head f8a21a3d4d415c52f0eb06e849a3475d2ccab128 against direct parent a183ea275e48e047eeb18790b09cac19d6e4b8c2. These measurements cover CPU selection and range construction on the Ryzen 7 7800X3D and apply to those tested commits.

All 24 correctness checks passed. On the overlapping in-flight ticket workload, 2,304 input occurrences selected 1,365 pieces. Across 32 paired rounds, the median CPU saving was 72.944 µs per batch. Allocated bytes fell from 656,692 to 455,960.

Codex-assisted validation and write-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants