dolphin-emulator/Source/Core
Léo Lam c812ab6a63
Jit: Optimize block link queries by using hash tables
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.)
2021-04-24 17:20:59 +02:00
..
AudioCommon Replace uses of cassert with Common/Assert.h 2021-04-02 10:18:18 -07:00
Common BlockingLoop: Add explicit [[fallthrough]] annotations 2021-04-19 17:34:46 -04:00
Core Jit: Optimize block link queries by using hash tables 2021-04-24 17:20:59 +02:00
DiscIO DiscIO: Use MathUtil::SaturatingCast 2021-04-06 23:27:23 +02:00
DolphinNoGUI Set console's default language/country/region based on computer settings 2021-03-27 10:05:26 +01:00
DolphinQt WiiUtils: Add helper functions to get emulated/real Bluetooth device 2021-04-12 18:16:56 +02:00
InputCommon Replace uses of cassert with Common/Assert.h 2021-04-02 10:18:18 -07:00
MacUpdater
UICommon [Updater] Check whether we've already had an update triggered 2021-03-11 02:48:46 -08:00
UpdaterCommon msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00
VideoBackends Merge pull request #9660 from ezio1900/master 2021-04-23 21:21:53 -04:00
VideoCommon VideoCommon: Fix scissorOffset, handle negative value correctly 2021-04-24 08:46:21 +08:00
WinUpdater msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00
CMakeLists.txt
DolphinLib.ARM64.props msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00
DolphinLib.props Set console's default language/country/region based on computer settings 2021-03-27 10:05:26 +01:00
DolphinLib.vcxproj JitCommon: Signed 32-bit division magic constants 2021-03-07 18:27:36 +01:00
DolphinLib.vcxproj.user msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00
DolphinLib.x64.props msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00