Heap: dynamic slot search over a bitset, a word of 64 taken or free slots per step #1719
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by 101Leafy on 2026-11-28T23:43:23Z.
The 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.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by stokeer on 2026-11-29T01:27:28Z.
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.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by amazedturnip on 2026-11-29T05:38:46Z.
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.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by 101Leafy on 2026-11-29T06:44:33Z.
Thanks, fixed in
b6e1546053:Taken::getis now built fordiagnosticstoo, as you suggested.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.