Three performance changes: binary-search the write-watch ahead ranges; opt-in descriptor copies as bytes and command-list reuse #469

Closed
github-bot wants to merge 3 commits from github-bot/gh-469 into main AGit
Owner

@⁠HungrySharkNet on GitHub · 2026-11-27 22:59 UTC · original
perf/ahead-lookup-desc-memcpy-list-cache → main · +280 −19 · 3 files · 3 commits · closed without merging

What

  1. writes() searched the submission's "asked ahead" page ranges linearly on every
    refresh, so a submission's cost grew with the square of its range count. The
    ranges are now sorted and merged once and looked up by binary search. Always on,
    no behaviour change.
  2. VICTORY_DESC_MEMCPY=1 (off by default): a descriptor is copied as step bytes
    of CPU-visible descriptor memory instead of CopyDescriptorsSimple(1, ...). The
    world's draws do tens of thousands of these a frame.
  3. VICTORY_LIST_CACHE=1 and VICTORY_LIST_CACHE_FULL=1 (off by default): a list
    whose recorded stream was seen before is run again from its recorded host list
    instead of being translated. The full variant holds the stream to the list's
    close, so identical lists are found even when another list object recorded them.

Measurements

Ryzen 5 5600X (6c/12t), RTX 4070, 1080p, no DLSS, dense scene (~5k draws/frame):

  • ahead lookup: "waiting for the write watch" fell from ~21-37 ms to ~18-22 ms per
    frame (all threads).
  • descriptor copies as bytes: the descriptor-slot work fell from 6.3-6.4 ms to
    5.4-6.0 ms per sampled sixteenth of the slots (about 10-15%).
  • list cache (full): 41-58 of ~207 lists a frame were reused (20-28%). No visual
    artifacts in testing; the card stayed 61-65% busy and the submission queue did
    not stall. The frame-time gain is limited: the repeated lists are mostly small,
    so the translated call count barely moves.

The two switches default off; the default build is unchanged.

Notes

The command-list cache is the most experimental of the three. It reuses a closed
host list whose deferred steps run again on resubmission; it was tested on this
scene only. Happy to split it into its own PR if that is easier to review.

**@⁠HungrySharkNet** on GitHub · 2026-11-27 22:59 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/469) `perf/ahead-lookup-desc-memcpy-list-cache` → `main` · +280 −19 · 3 files · 3 commits · closed without merging ## What 1. `writes()` searched the submission's "asked ahead" page ranges linearly on every refresh, so a submission's cost grew with the square of its range count. The ranges are now sorted and merged once and looked up by binary search. Always on, no behaviour change. 2. `VICTORY_DESC_MEMCPY=1` (off by default): a descriptor is copied as `step` bytes of CPU-visible descriptor memory instead of `CopyDescriptorsSimple(1, ...)`. The world's draws do tens of thousands of these a frame. 3. `VICTORY_LIST_CACHE=1` and `VICTORY_LIST_CACHE_FULL=1` (off by default): a list whose recorded stream was seen before is run again from its recorded host list instead of being translated. The full variant holds the stream to the list's close, so identical lists are found even when another list object recorded them. ## Measurements Ryzen 5 5600X (6c/12t), RTX 4070, 1080p, no DLSS, dense scene (~5k draws/frame): - ahead lookup: "waiting for the write watch" fell from ~21-37 ms to ~18-22 ms per frame (all threads). - descriptor copies as bytes: the descriptor-slot work fell from 6.3-6.4 ms to 5.4-6.0 ms per sampled sixteenth of the slots (about 10-15%). - list cache (full): 41-58 of ~207 lists a frame were reused (20-28%). No visual artifacts in testing; the card stayed 61-65% busy and the submission queue did not stall. The frame-time gain is limited: the repeated lists are mostly small, so the translated call count barely moves. The two switches default off; the default build is unchanged. ## Notes The command-list cache is the most experimental of the three. It reuses a closed host list whose deferred steps run again on resubmission; it was tested on this scene only. Happy to split it into its own PR if that is easier to review.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 23:00:13 +00:00
github-bot closed this pull request 2026-11-28 00:04:38 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.