[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
This commit is contained in:
Michel Heily 2020-11-05 15:03:44 -08:00 committed by MishMish
parent 05b1ff10e3
commit a413ebe891

View file

@ -346,7 +346,7 @@ impl<I: MemoryInterface> Core<I> {
} }
} }
#[inline] #[inline(always)]
pub(super) fn check_arm_cond(&self, cond: ArmCond) -> bool { pub(super) fn check_arm_cond(&self, cond: ArmCond) -> bool {
use ArmCond::*; use ArmCond::*;
match cond { match cond {
@ -469,6 +469,7 @@ impl<I: MemoryInterface> Core<I> {
/// Perform a pipeline step /// Perform a pipeline step
/// If an instruction was executed in this step, return it. /// If an instruction was executed in this step, return it.
#[inline]
pub fn step(&mut self) { pub fn step(&mut self) {
match self.cpsr.state() { match self.cpsr.state() {
CpuState::ARM => { CpuState::ARM => {