Reuse the first ready descriptor batch #38

Open
github-bot wants to merge 1 commit from github-bot/gh-38 into main AGit
Owner

@⁠avt0m4t48 on GitHub · 2026-12-03 05:05 UTC · original
avt0m4t48:perf-reuse-deferred-descriptor-batch → main · +7 −1 · 1 files · 1 commits · draft

The descriptor sync already owns each vector of ready slots. Reuse the first nonempty batch as the output buffer, so collecting a single batch costs no extra vector allocation or copy. Append later batches in the same order. The four-frame grace period, FIFO cutoff and sorting and deduplication after unlocking are unchanged.

Local verification

An independent ordered-set oracle matched all 180,000 queue comparisons in each build, including duplicates, empty inputs, future batches and out-of-order frame stamps. The benchmark timed the lock, collection, sort and deduplication in synthetic queues on a Linux i7-7700HQ. Each row is based on 18 paired Rust 1.98.1 optimized runs.

Ready slots Generic x86-64 x86-64-v3
One batch of 8,192 ordered slots 23.69 → 7.82 µs 23.68 → 7.82 µs
One batch of 8,192 shuffled slots 119.11 → 102.29 µs 120.85 → 103.01 µs
Eight mixed batches of 8,192 slots 1,127.3 → 1,036.0 µs 1,073.8 → 937.3 µs
Future batches only 33.72 → 33.86 ns 35.17 → 34.39 ns

The single large batch removes one 32 KiB allocation in both builds. These are CPU fixture results. Production lock contention, Windows timings, GPU behavior and gameplay FPS were outside the measurement.

The standalone GPU test targets and integrated workspace test targets type-checked for Windows x86-64 MSVC with pure-Rust BLAKE3 and a metadata-only allocator declaration. The integrated checks covered both diagnostics settings. The staged asset policy passed.

**@⁠avt0m4t48** on GitHub · 2026-12-03 05:05 UTC · [original](https://github.com/linkoovosh/LinkoArts-build/pull/38) `avt0m4t48:perf-reuse-deferred-descriptor-batch` → `main` · +7 −1 · 1 files · 1 commits · draft The descriptor sync already owns each vector of ready slots. Reuse the first nonempty batch as the output buffer, so collecting a single batch costs no extra vector allocation or copy. Append later batches in the same order. The four-frame grace period, FIFO cutoff and sorting and deduplication after unlocking are unchanged. ### Local verification An independent ordered-set oracle matched all 180,000 queue comparisons in each build, including duplicates, empty inputs, future batches and out-of-order frame stamps. The benchmark timed the lock, collection, sort and deduplication in synthetic queues on a Linux i7-7700HQ. Each row is based on 18 paired Rust 1.98.1 optimized runs. | Ready slots | Generic x86-64 | x86-64-v3 | |---|---:|---:| | One batch of 8,192 ordered slots | 23.69 → 7.82 µs | 23.68 → 7.82 µs | | One batch of 8,192 shuffled slots | 119.11 → 102.29 µs | 120.85 → 103.01 µs | | Eight mixed batches of 8,192 slots | 1,127.3 → 1,036.0 µs | 1,073.8 → 937.3 µs | | Future batches only | 33.72 → 33.86 ns | 35.17 → 34.39 ns | The single large batch removes one 32 KiB allocation in both builds. These are CPU fixture results. Production lock contention, Windows timings, GPU behavior and gameplay FPS were outside the measurement. The standalone GPU test targets and integrated workspace test targets type-checked for Windows x86-64 MSVC with pure-Rust BLAKE3 and a metadata-only allocator declaration. The integrated checks covered both diagnostics settings. The staged asset policy passed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-04 05:22:41 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/38/head:github-bot/gh-38'
git switch 'github-bot/gh-38'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-38'
git switch 'github-bot/gh-38'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-38'
git switch 'github-bot/gh-38'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-38'
git switch 'main'
git merge --squash 'github-bot/gh-38'
git switch 'main'
git merge --ff-only 'github-bot/gh-38'
git switch 'main'
git merge 'github-bot/gh-38'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.