From: Paul Cercueil Date: Fri, 6 Oct 2023 20:53:47 +0000 (+0200) Subject: Add compile-time option to drop psxMemRLUT, psxMemWLUT X-Git-Tag: r24~124 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bb8d7e16bad9322d862d6d0dcaa048d75064c1f;hp=4bb8d7e16bad9322d862d6d0dcaa048d75064c1f;p=pcsx_rearmed.git Add compile-time option to drop psxMemRLUT, psxMemWLUT Add compile-time option which, if enabled, will replace accesses to psxMemRLUT and psxMemWLUT with a small inline function psxm(). The reasons behind this change are: - These were some BIG LUTs. On 32-bit, they would account for 512 KiB of RAM. On 64-bit, they would account for 1 MiB of RAM. This sounds tiny by today's standards, but it still is huge for some of the platforms that PCSX supports. - Computing the pointer isn't that resource-intensive. Still slower than reading from a LUT (as long as the LUT entry is in the cache, which it should be, as the few valid entries are grouped together), but I doubt that it slows down the interpreter by a lot. - Even if it does slow down the interpreter a bit, it shouldn't be a huge deal, given that the interpreter isn't really used nowadays as the JITs support all the major CPU architectures, and the interpreter is used mostly for debugging purposes. Besides, the two JITs do not use these LUTs. Signed-off-by: Paul Cercueil ---