[pr-performance] Look up only the previous buffer tier when registering a key #36

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

@⁠avt0m4t48 on GitHub · 2026-12-03 04:44 UTC · original
avt0m4t48:perf-linko-buffer-previous-tier → main · +2 −2 · 1 files · 1 commits · draft

Change

Read the old registration from the primary map to identify the only tier where its key can be present. For a fresh registration, go directly to inserting the new entry. This preserves the order of tier and primary-map updates and avoids adding any registry storage.

Verification

The mutation replay and three existing registry tests passed with both exact source variants. The checks cover overwrites within and across tiers, zero-length and upper-address registrations, equal-address ties, nested buffers, and ownership of the cached copy. Allocation and free counts matched across the timed fixtures.

Pinned Linux replay using fat LTO and one codegen unit. Each result uses 12 time comparisons:

Fixture Original Patched Median paired change
Populate and drain five tiers 401.74 ns 298.05 ns -25.73%
Replace a registration of the same size 481.67 ns 297.14 ns -39.06%
Replace a registration across tiers 694.19 ns 502.55 ns -28.03%
Populate and drain one tier 277.42 ns 273.14 ns -2.35%

The fixture models registry work and an inert owned copy. Resource destruction, the actual mix of registrations, Windows runtime and frame times were outside the measurement.

The Windows x86-64 MSVC GPU test targets and the integrated workspace test targets type-checked. The integrated workspace was checked with diagnostics enabled and disabled. The allocator declaration was used for metadata only, and the staged asset policy passed.

**@⁠avt0m4t48** on GitHub · 2026-12-03 04:44 UTC · [original](https://github.com/linkoovosh/LinkoArts-build/pull/36) `avt0m4t48:perf-linko-buffer-previous-tier` → `main` · +2 −2 · 1 files · 1 commits · draft ## Change Read the old registration from the primary map to identify the only tier where its key can be present. For a fresh registration, go directly to inserting the new entry. This preserves the order of tier and primary-map updates and avoids adding any registry storage. ## Verification The mutation replay and three existing registry tests passed with both exact source variants. The checks cover overwrites within and across tiers, zero-length and upper-address registrations, equal-address ties, nested buffers, and ownership of the cached copy. Allocation and free counts matched across the timed fixtures. Pinned Linux replay using fat LTO and one codegen unit. Each result uses 12 time comparisons: | Fixture | Original | Patched | Median paired change | | --- | ---: | ---: | ---: | | Populate and drain five tiers | 401.74 ns | 298.05 ns | -25.73% | | Replace a registration of the same size | 481.67 ns | 297.14 ns | -39.06% | | Replace a registration across tiers | 694.19 ns | 502.55 ns | -28.03% | | Populate and drain one tier | 277.42 ns | 273.14 ns | -2.35% | The fixture models registry work and an inert owned copy. Resource destruction, the actual mix of registrations, Windows runtime and frame times were outside the measurement. The Windows x86-64 MSVC GPU test targets and the integrated workspace test targets type-checked. The integrated workspace was checked with diagnostics enabled and disabled. The allocator declaration was used for metadata only, and the staged asset policy passed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-04 05:22:31 +00:00
This pull request has changes conflicting with the target branch.
  • crates/darner-gpu/src/shadow.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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