From df038c69e13f7fe35e5068625a90e96861e9425c Mon Sep 17 00:00:00 2001 From: Michal Moskal Date: Sun, 28 Jul 2024 18:42:45 +0000 Subject: [PATCH] perf opt --- parser/src/earley/regexvec.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/parser/src/earley/regexvec.rs b/parser/src/earley/regexvec.rs index 450106d3..518424cf 100644 --- a/parser/src/earley/regexvec.rs +++ b/parser/src/earley/regexvec.rs @@ -160,6 +160,7 @@ impl RegexVec { /// Return index of lowest matching regex if any. /// Lazy regexes match as soon as they accept, while greedy only /// if they accept and force EOI. + #[inline(always)] pub fn lowest_match(&mut self, state: StateID) -> Option<(usize, usize)> { if let Some(lowest_match) = self.state_descs[state.as_usize()].lowest_match { return lowest_match;