[pr-performance] Bank indirect merge counters by command list #44

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

@⁠avt0m4t48 on GitHub · 2026-12-03 05:42 UTC · original
avt0m4t48:perf-indirect-counter-banks → main · +31 −7 · 2 files · 1 commits · draft

Change

Bank the indirect-merge counters by the host command list address. Separate command lists can record on different threads. Their counters usually land in different cache lines, with one atomic increment per verdict and one more for a successful join.

The frame meter folds the banks into the existing counters. The merge decisions, recorded command lists and log format use the same code and fields as before.

Verification

Both CPU targets replayed the original and the patched Rust counter code against an independent count for every verdict and successful join. The test drained concurrently with up to 36 producers and also checked two exact reporting boundaries with the producers paused.

The benchmark reports elapsed CPU fixture time divided by operations across all workers, with 16 shuffled runs per case. These tests used Linux on an i7-7700HQ. Their timings cover counter updates and collection. Windows GPU execution and gameplay FPS remain unmeasured.

CPU control Baseline Banks
Four recording threads, mixed verdicts, x86-64-v3 15.63 ns/op 1.65 ns/op
Two recording threads, mixed verdicts, x86-64-v3 15.19 ns/op 3.23 ns/op
Four recording threads, one bank forced, x86-64-v3 21.43 ns/op 21.30 ns/op
One recording thread, mixed verdicts, generic x86-64 5.76 ns/op 6.16 ns/op
Empty meter collection, x86-64-v3 62.28 ns 101.17 ns

The banks use 2 KiB of static storage, up from 96 bytes. A matching address bank can retain the original contention. A concurrent frame sample can split increments across reporting windows. Both quiescent windows and cumulative counts matched exactly.

The standalone GPU test targets and combined workspace test targets passed the Windows x64 MSVC Rust type checks with pure Rust BLAKE3 and an allocator link-metadata declaration. The combined checks ran with diagnostics both on and off. Both staged source sets passed the asset policy.

**@⁠avt0m4t48** on GitHub · 2026-12-03 05:42 UTC · [original](https://github.com/linkoovosh/LinkoArts-build/pull/44) `avt0m4t48:perf-indirect-counter-banks` → `main` · +31 −7 · 2 files · 1 commits · draft ## Change Bank the indirect-merge counters by the host command list address. Separate command lists can record on different threads. Their counters usually land in different cache lines, with one atomic increment per verdict and one more for a successful join. The frame meter folds the banks into the existing counters. The merge decisions, recorded command lists and log format use the same code and fields as before. ## Verification Both CPU targets replayed the original and the patched Rust counter code against an independent count for every verdict and successful join. The test drained concurrently with up to 36 producers and also checked two exact reporting boundaries with the producers paused. The benchmark reports elapsed CPU fixture time divided by operations across all workers, with 16 shuffled runs per case. These tests used Linux on an i7-7700HQ. Their timings cover counter updates and collection. Windows GPU execution and gameplay FPS remain unmeasured. | CPU control | Baseline | Banks | | --- | ---: | ---: | | Four recording threads, mixed verdicts, x86-64-v3 | 15.63 ns/op | 1.65 ns/op | | Two recording threads, mixed verdicts, x86-64-v3 | 15.19 ns/op | 3.23 ns/op | | Four recording threads, one bank forced, x86-64-v3 | 21.43 ns/op | 21.30 ns/op | | One recording thread, mixed verdicts, generic x86-64 | 5.76 ns/op | 6.16 ns/op | | Empty meter collection, x86-64-v3 | 62.28 ns | 101.17 ns | The banks use 2 KiB of static storage, up from 96 bytes. A matching address bank can retain the original contention. A concurrent frame sample can split increments across reporting windows. Both quiescent windows and cumulative counts matched exactly. The standalone GPU test targets and combined workspace test targets passed the Windows x64 MSVC Rust type checks with pure Rust BLAKE3 and an allocator link-metadata declaration. The combined checks ran with diagnostics both on and off. Both staged source sets passed the asset policy.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-04 05:22:57 +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/44/head:github-bot/gh-44'
git switch 'github-bot/gh-44'

Merge

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