perf: mimalloc as the global allocator (+5% fps, smoother spawn under Proton) #35
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
reviewed
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Slaktarn700--SlaktarnVI!35
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-35"
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?
@Timmybread22 on GitHub · 2026-12-01 06:49 UTC · original
Timmybread22:pr-mimalloc→main· +24 −4 · 3 files · 1 commits · closed without mergingSwaps the system allocator under
copystat::Countingfor mimalloc (the counting stays as it is).Why: a profile of
victory-submitunder Proton showed ~18% of its samples inCounting::realloc/alloc, which is Wine'sHeapAlloc/HeapReAlloc. With mimalloc they are gone from the profile.Measured (CachyOS, RX 6900 XT on RADV / Mesa 26.3, Ryzen 9 5900X, patched Proton, same save, 2-minute runs):
Builds with
cargo xwinas is (mimalloc = { version = "0.1", default-features = false }). Not tested on Windows.🤖 Generated with Claude Code
fe0c977b4ftoee73d9b862@Slaktarn700 on GitHub · 2026-12-01 14:56 UTC · original
I tried mimalloc 0.1.52 before on this PC: faster per call (7-12 ns against 31-45), but the frame was the same (57.7 ms in both, one run each). Your 5900X may gain where mine does not: please run it as pairs on one scene, equal draws, two or three each, and I will look again. A new dependency is not taken for a gain I cannot see.
@Slaktarn700 on GitHub · 2026-12-05 03:25 UTC · original
Thank you. Since 2026-12-02 main is on a new base (VIctory-xmem), and the files this changes are not there anymore, so it cannot merge as it is. If the same idea helps on the new base, a new pull request against main is welcome.
@Slaktarn700 on GitHub · 2026-12-05 05:00 UTC · original
Thank you. The new base (VIctory-xmem, on main since 2026-12-02) already does this: every allocation goes through mimalloc there (
PortHeapincrates/victory-gpu/src/port_heap.rs). So there is nothing left to merge, and the files this changes look different now. Closing as done.Pull request closed