Heap: dynamic slot search over a bitset, a word of 64 taken or free slots per step #1719
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1719
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1719"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@101Leafy on GitHub · 2026-11-28 23:43 UTC · original
101Leafy:nv/slot-bitset→main· +163 −27 · 3 files · 2 commits · openThe search for a run of free dynamic descriptor slots walked the taken flags one slot at a time over a Vec, so with a busy heap every table that asked for slots could step through most of the ring before it found a run or gave up.
The taken flags are now a bitset, and the search looks at a word of 64 slots per step: a word that is all taken or all free is passed over at once, and trailing_zeros finds where the next free or taken slot starts. It finds the same run as before, from the cursor on and then from the start up to cursor + n - 1, and release counts the slots it gives back the same way. A test checks it against the old slot by slot search on random fills.
There is no switch since nothing changes but the time the search takes.
@stokeer on GitHub · 2026-11-29 01:27 UTC · original
This breaks the diagnostics build (
cargo build --profile diag -p victory --features diagnostics):slot_storyindescriptor/host.rsis built withdiagnosticsand callsTaken::get, which this PR makes#[cfg(test)]. Making it available to both fixes it:Measured on a Ryzen 7 5700 + RTX 3060 Ti 8 GB (merged on
f9dfb76fwith seven other open PRs): no frame-time change in the prologue cell, ~53 ms against ~51 ms without them.6f44045920to2a0c971728@amazedturnip on GitHub · 2026-11-29 05:38 UTC · original
Tested on 9800X3D + RTX 5070 Ti 16 GB across 20+ min sessions + full GPU unit suite. Dynamic bitset slot search ran cleanly with zero heap allocation or slot-reuse issues.
@101Leafy on GitHub · 2026-11-29 06:44 UTC · original
Thanks, fixed in
b6e1546053:Taken::getis now built fordiagnosticstoo, as you suggested.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.Merge
Merge the changes and update on Forgejo.