Added support crossplatform low-level allocator mimalloc#21474
Added support crossplatform low-level allocator mimalloc#21474GermanAizek wants to merge 1 commit intohrydgard:masterfrom
Conversation
For those who need even more performance in working with memory at the expense of RAM consumption, you can build a project with CMake parameter -Dmimalloc mimalloc allocator was originally designed as a performance-first solution. - Fast paths: In mimalloc, memory allocation and deallocation typically occur in the minimum number of processor cycles - Free list sharding: It uses segmented lists of free memory, which drastically reduces the load on the processor cache Benchmarks: - https://dustri.org/b/files/blackalps_2022.pdf - https://forums.factorio.com/viewtopic.php?t=83875 - https://lf-hyperledger.atlassian.net/wiki/spaces/BESU/pages/22156632/Reduce+Memory+usage+by+choosing+a+different+low+level+allocator - https://www.reddit.com/r/cpp/comments/1k30fcd/reasons_to_use_the_system_allocator_instead_of_a/
|
If this makes a noticable difference in performance, we need to fix that by reducing allocations made per frame, which is certainly possible. I don't really like the idea of replacing the memory allocator without understanding why our allocator usage is bad and trying to fix that first. |
|
Hmm... this doesn't replace |
|
Well to be clear, I'm not going to merge this. It's an addition of complexity that we really don't need. As far as I know, PPSSPP isn't bottlenecked by the memory allocator anywhere, and like I said, if it is, that's what should be fixed. We should tolerate slow allocators. |
@hrydgard,
My benchmarks on AMD HD 7750 2GB I'll upload tomorrow with video difference in frametime graph and Mangohud metrics.
For those who need even more performance in working with memory at the expense of RAM consumption, you can build a project with CMake parameter -Dmimalloc mimalloc allocator was originally designed as a performance-first solution.
Not my Benchmarks: