From b7d7b2756623ad8da7ac411c15df02a9b3db5f0a Mon Sep 17 00:00:00 2001 From: mos Date: Fri, 25 Oct 2024 10:09:19 +0200 Subject: [PATCH] inline toggle_box to eliminate bounds checking --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index 49f12e9..9cb329e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -193,6 +193,7 @@ impl State { State { lvl } } + #[inline(always)] fn toggle_box(&mut self, pos: &Pos) { self.lvl[*pos] = if self.lvl[*pos] == Cell::Goal(true) { Cell::Goal(false)