dolphin/Source
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
..
Android Merge pull request #9653 from JosJuice/android-import-nand 2021-04-19 21:57:40 +02:00
Core Jit: Optimize block link queries by using hash tables 2021-04-24 17:20:59 +02:00
DSPSpy
DSPTool Set console's default language/country/region based on computer settings 2021-03-27 10:05:26 +01:00
PCH Fix PCH when building with CMake + Ninja + MSVC on Windows 2021-04-17 17:48:47 +02:00
UnitTests UnitTests: Use MathUtil::SaturatingCast to avoid UB 2021-04-06 23:27:23 +02:00
VSProps msbuild: re-enable HAS_OPENGL and HAS_VULKAN 2021-01-27 19:10:53 -08:00
.clang-format
CMakeLists.txt CMake: Build with -std:c++latest for MSVC 2021-03-03 23:44:35 +01:00
dolphin-emu.sln msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00