summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2021-04-15 12:35:46 +0200
committerLéo Lam <leo@leolam.fr>2021-04-24 17:20:59 +0200
commitc812ab6a633b985f0c765428acf1062b4929a9c0 (patch)
tree3b7c6c5145691502e2ac8b66fcf68d197965a81a /Source/Core/InputCommon/ControlReference/ExpressionParser.cpp
parent18e84361d925af09586b940b265f10e501e889d6 (diff)
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.)
Diffstat (limited to 'Source/Core/InputCommon/ControlReference/ExpressionParser.cpp')
0 files changed, 0 insertions, 0 deletions