diff --git a/parser/src/earley/parser.rs b/parser/src/earley/parser.rs index e6fc7803..5a520116 100644 --- a/parser/src/earley/parser.rs +++ b/parser/src/earley/parser.rs @@ -1595,6 +1595,7 @@ impl BiasComputer for DefaultBiasComputer { } impl<'a> Recognizer for ParserRecognizer<'a> { + #[inline(always)] fn pop_bytes(&mut self, num: usize) { self.state.pop_lexer_states(num); } diff --git a/parser/src/earley/regexvec.rs b/parser/src/earley/regexvec.rs index 24205426..b91ae567 100644 --- a/parser/src/earley/regexvec.rs +++ b/parser/src/earley/regexvec.rs @@ -64,6 +64,7 @@ impl RegexVec { self.insert_state(vec_desc) } + #[inline(always)] pub fn state_desc(&self, state: StateID) -> &StateDesc { &self.state_descs[state.as_usize()] }