From a566038e50f1885adf2777673d39d68ac01f766c Mon Sep 17 00:00:00 2001 From: Danil Date: Thu, 26 Oct 2023 17:44:58 +0200 Subject: [PATCH] Add inlines Signed-off-by: Danil --- Cargo.lock | 13 ------------- .../src/versions/vm_latest/tracers/dispatcher.rs | 6 ++++++ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5ed850e73a67..607aa9446c9b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -541,18 +541,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "auto_impl" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" -dependencies = [ - "proc-macro-error", - "proc-macro2 1.0.66", - "quote 1.0.33", - "syn 1.0.109", -] - [[package]] name = "autocfg" version = "0.1.8" @@ -4002,7 +3990,6 @@ name = "multivm" version = "0.1.0" dependencies = [ "anyhow", - "auto_impl", "ethabi", "hex", "itertools", diff --git a/core/lib/multivm/src/versions/vm_latest/tracers/dispatcher.rs b/core/lib/multivm/src/versions/vm_latest/tracers/dispatcher.rs index db93f2bab2f5..14c42757f769 100644 --- a/core/lib/multivm/src/versions/vm_latest/tracers/dispatcher.rs +++ b/core/lib/multivm/src/versions/vm_latest/tracers/dispatcher.rs @@ -35,12 +35,14 @@ impl Default for TracerDispatcher { } impl DynTracer> for TracerDispatcher { + #[inline(always)] fn before_decoding(&mut self, _state: VmLocalStateData<'_>, _memory: &SimpleMemory) { for tracer in self.tracers.iter() { tracer.borrow_mut().before_decoding(_state, _memory); } } + #[inline(always)] fn after_decoding( &mut self, _state: VmLocalStateData<'_>, @@ -52,6 +54,7 @@ impl DynTracer> for TracerDi } } + #[inline(always)] fn before_execution( &mut self, _state: VmLocalStateData<'_>, @@ -65,6 +68,8 @@ impl DynTracer> for TracerDi .before_execution(_state, _data, _memory, _storage.clone()); } } + + #[inline(always)] fn after_execution( &mut self, _state: VmLocalStateData<'_>, @@ -87,6 +92,7 @@ impl VmTracer for TracerDispatcher } } /// Run after each vm execution cycle + #[inline(always)] fn finish_cycle( &mut self, _state: &mut ZkSyncVmState,