From 77e25a656eca0cb1639ae39c515ac6c5f86d2ac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 26 Apr 2023 20:02:27 +0200 Subject: refactor(core): simplify op types and codegeneration (#18843) About 2% improvement on WS/HTTP benchmarks, possibly unlocking more optimizations in the future. --------- Co-authored-by: Matt Mastracci --- core/ops_metrics.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/ops_metrics.rs') diff --git a/core/ops_metrics.rs b/core/ops_metrics.rs index c0b8abb51..b25368bd0 100644 --- a/core/ops_metrics.rs +++ b/core/ops_metrics.rs @@ -63,7 +63,7 @@ impl OpsTracker { #[inline] fn metrics_mut(&self, id: OpId) -> RefMut { - RefMut::map(self.ops.borrow_mut(), |ops| &mut ops[id]) + RefMut::map(self.ops.borrow_mut(), |ops| &mut ops[id as usize]) } #[inline] -- cgit v1.2.3