Reserve descriptor sync result buffers once #42

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

@⁠avt0m4t48 on GitHub · 2026-12-03 05:15 UTC · original
avt0m4t48:perf-reserve-descriptor-sync-results → main · +9 −1 · 1 files · 1 commits · draft

Change

Sum the worker result lengths after the scan and reserve each aggregate once. The original consuming loop still adds the same counters, merges slot indexes in worker order and releases the worker buffers at the same points. The sizing pass has exclusive access to the worker mutexes and does not lock them.

Measurement

In 24 paired synthetic Linux x86-64 rounds, the common layout's dense twenty-worker assembly went from 4.99 to 2.65 µs, and an eighty-worker mixed layout went from 11.64 to 7.49 µs. The layout with additional NVIDIA diagnostic counters went from 4.90 to 2.66 µs and 11.42 to 7.39 µs in the same cases. A second fixture reduced the dense 160-page case from ten growth reallocations to zero on both layouts.

Empty rounds can be slightly slower. In the NVIDIA-fork x86-64-v3 fixture, twenty empty workers added about 66 ns. Reserving earlier can also increase the momentary overlap between the worker and destination buffers. The queued wait vector holds only the reserved slot count on the tested allocator.

Verification

  • In each of four Linux builds, 12,288 independent oracle comparisons preserved ordered indexes and all counters. Three poisoned-mutex cases also matched in each build.
  • The staged source-only patch passed the repository asset policy.
  • Windows MSVC-target Rust checking covered the standalone GPU test targets and the integrated workspace test targets with diagnostics on and off. These metadata checks used pure Rust BLAKE3 and a metadata-only allocator override.
  • The synthetic clocks cover CPU assembly. They do not measure native Windows execution, mirrored descriptor work, GPU time or frame rate.
**@⁠avt0m4t48** on GitHub · 2026-12-03 05:15 UTC · [original](https://github.com/linkoovosh/LinkoArts-build/pull/42) `avt0m4t48:perf-reserve-descriptor-sync-results` → `main` · +9 −1 · 1 files · 1 commits · draft ## Change Sum the worker result lengths after the scan and reserve each aggregate once. The original consuming loop still adds the same counters, merges slot indexes in worker order and releases the worker buffers at the same points. The sizing pass has exclusive access to the worker mutexes and does not lock them. ## Measurement In 24 paired synthetic Linux x86-64 rounds, the common layout's dense twenty-worker assembly went from 4.99 to 2.65 µs, and an eighty-worker mixed layout went from 11.64 to 7.49 µs. The layout with additional NVIDIA diagnostic counters went from 4.90 to 2.66 µs and 11.42 to 7.39 µs in the same cases. A second fixture reduced the dense 160-page case from ten growth reallocations to zero on both layouts. Empty rounds can be slightly slower. In the NVIDIA-fork x86-64-v3 fixture, twenty empty workers added about 66 ns. Reserving earlier can also increase the momentary overlap between the worker and destination buffers. The queued wait vector holds only the reserved slot count on the tested allocator. ## Verification - In each of four Linux builds, 12,288 independent oracle comparisons preserved ordered indexes and all counters. Three poisoned-mutex cases also matched in each build. - The staged source-only patch passed the repository asset policy. - Windows MSVC-target Rust checking covered the standalone GPU test targets and the integrated workspace test targets with diagnostics on and off. These metadata checks used pure Rust BLAKE3 and a metadata-only allocator override. - The synthetic clocks cover CPU assembly. They do not measure native Windows execution, mirrored descriptor work, GPU time or frame rate.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-04 05:22:52 +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/42/head:github-bot/gh-42'
git switch 'github-bot/gh-42'

Merge

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