mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-23 06:57:08 +00:00
Repeated erase() + iteration on a std::multimap is extremely slow. Slow enough that it causes a 7 second long stutter during some transitions in F-Zero X (a N64 VC game that triggers many, many icache invalidations). And slow enough that JitBaseBlockCache::DestroyBlock shows up on a flame graph as taking >50% of total CPU time on the CPU-GPU thread: https://i.imgur.com/vvqiFL6.png This commit optimises those block link queries by replacing the std::multimap (which is typically implemented with red-black trees) with hash tables. Master: https://i.imgur.com/vvqiFL6.png / 7s stutters (starting from 5.0-2021 and with branch following disabled) This commit: https://i.imgur.com/hAO74fy.png / ~0.7s stutters, which is pretty close to 5.0 stable. (5.0-2021 introduced the performance regression and it is especially noticeable when branch following is disabled, which is the case for all N64 VC games since 5.0-8377.) |
||
|---|---|---|
| .. | ||
| AudioCommon | ||
| Common | ||
| Core | ||
| DiscIO | ||
| DolphinNoGUI | ||
| DolphinQt | ||
| InputCommon | ||
| MacUpdater | ||
| UICommon | ||
| UpdaterCommon | ||
| VideoBackends | ||
| VideoCommon | ||
| WinUpdater | ||
| CMakeLists.txt | ||
| DolphinLib.ARM64.props | ||
| DolphinLib.props | ||
| DolphinLib.vcxproj | ||
| DolphinLib.vcxproj.user | ||
| DolphinLib.x64.props | ||