From a413ebe8917669d30c5a0eda306a6db38b88bd1a Mon Sep 17 00:00:00 2001 From: Michel Heily Date: Thu, 5 Nov 2020 15:03:44 -0800 Subject: [PATCH] [perf] core: arm7tdmi: inline arm7tdmi::Core::step function run_60_frames time: [158.26 ms 160.84 ms 163.03 ms] change: [-24.960% -18.808% -12.975%] (p = 0.00 < 0.05) Performance has improved. Wasn't expecting such an improvment tbh, but who am I to argue with results Former-commit-id: a5ba74bffa26d962a232c0767a34a7d67ed8ccb4 Former-commit-id: 1b9b301ba9012e79e66822ac39af51df28c51fa4 --- core/src/arm7tdmi/cpu.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/arm7tdmi/cpu.rs b/core/src/arm7tdmi/cpu.rs index e933133..0672b43 100644 --- a/core/src/arm7tdmi/cpu.rs +++ b/core/src/arm7tdmi/cpu.rs @@ -346,7 +346,7 @@ impl Core { } } - #[inline] + #[inline(always)] pub(super) fn check_arm_cond(&self, cond: ArmCond) -> bool { use ArmCond::*; match cond { @@ -469,6 +469,7 @@ impl Core { /// Perform a pipeline step /// If an instruction was executed in this step, return it. + #[inline] pub fn step(&mut self) { match self.cpsr.state() { CpuState::ARM => {