From a9f30851662108c22750feb27cbeeda98715df37 Mon Sep 17 00:00:00 2001 From: _ <_@_> Date: Wed, 4 Oct 2023 18:29:58 -0500 Subject: [PATCH] :chart_with_upwards_trend: performance: incrementing PC right after fetch seems to get it under 2900 ms --- lunar_wave_vm/src/state.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lunar_wave_vm/src/state.rs b/lunar_wave_vm/src/state.rs index 1d9dd0d..01abbe5 100644 --- a/lunar_wave_vm/src/state.rs +++ b/lunar_wave_vm/src/state.rs @@ -556,6 +556,7 @@ impl State { }; let i = self.fetch (); + self.incr_pc (); match i.opcode () { 0x22 => { @@ -1047,8 +1048,6 @@ impl State { x => unimplemented! ("{x}"), } - self.incr_pc (); - Ok (None) }