dolphin/Source/Core
Pierre Bourdon 3990002250 Optimize JitCache::InvalidateICache by maintaining a "valid blocks" bitset
Most of the InvalidateICache calls are for a 32 bytes block: this is the
number of bytes invalidated by PowerPC dcb*/icb* instructions. Profiling
shows that a lot of CPU time is spent checking if there are any JIT blocks
covered by these 32 bytes (using std::map::lower_bound).

This patch adds a bitset containing the state of every 32 bytes block in
RAM (JIT cached/not JIT cached). Using that, a 32 bytes InvalidateICache
can check in the bitset if any JIT block might be invalidated. A bitset
check is a lot faster than an std::map::lower_bound operation, improving
performance of JitCache::InvalidateICache by more than 100%.

Some practical numbers:

* Xenoblade Chronicles (PAL)
  56.04FPS -> 59.28FPS (+5.78%)
* The Last Story (PAL)
  30.9FPS -> 32.83FPS (+6.25%)
* Super Mario Galaxy (PAL)
  59.76FPS -> 62.46FPS (+4.52%)

This function still takes more time than it should - more optimization in
this area might be possible (specializing for 32 bytes blocks to avoid
useless memcpy, for example).
2012-10-06 01:49:09 +02:00
..
AudioCommon Implemented proper timing in the "No audio output" back-end. 2012-07-01 17:07:58 +10:00
Common If setting videobackend back to null strings, Just set it to the front of the list. Fixes loading game specific INI files that don't load back the "default" video backend which is nothing. 2012-09-25 00:47:37 +00:00
Core Optimize JitCache::InvalidateICache by maintaining a "valid blocks" bitset 2012-10-06 01:49:09 +02:00
DiscIO Use do { ... } while (0) for the *_LOG macros 2012-08-20 13:12:49 +02:00
DolphinWX Implement a simple benchmarking mode which logs FPS to a file 2012-10-04 05:41:02 +02:00
InputCommon Re-add hack to use SDL/SDL.h ifndef _WIN32. 2012-07-14 20:50:58 -06:00
VideoCommon Implement a simple benchmarking mode which logs FPS to a file 2012-10-04 05:41:02 +02:00
CMakeLists.txt Merge UI related projects into the main DolphinWX project. 2011-02-11 21:37:52 +00:00