diff --git a/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter.cpp b/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter.cpp index b281ac0300b..a8733b91b60 100644 --- a/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter.cpp +++ b/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter.cpp @@ -66,10 +66,25 @@ void CachedInterpreter::ExecuteOneBlock() while (true) { const auto callback = *reinterpret_cast(normal_entry); - if (const auto distance = callback(ppc_state, normal_entry + sizeof(callback))) - normal_entry += distance; + const u8* payload = normal_entry + sizeof(callback); + // Direct dispatch to the most commonly used callbacks for better performance + if (callback == reinterpret_cast(CallbackCast(Interpret))) [[likely]] + { + Interpret(ppc_state, *reinterpret_cast(payload)); + normal_entry = payload + sizeof(InterpretOperands); + } + else if (callback == reinterpret_cast(CallbackCast(Interpret))) + { + Interpret(ppc_state, *reinterpret_cast(payload)); + normal_entry = payload + sizeof(InterpretOperands); + } else - break; + { + if (const auto distance = callback(ppc_state, payload)) + normal_entry += distance; + else + break; + } } }