perf: mimalloc as the global allocator (+5% fps, smoother spawn under Proton) #35
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from Slaktarn700/SlaktarnVI. Originally posted by Timmybread22 on 2026-12-01T06:49:55Z.
Swaps 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
Imported from Slaktarn700/SlaktarnVI. Originally posted by Slaktarn700 on 2026-12-01T14:56:27Z.
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.
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.