Here's a small idea for Hera optimization: skip matching the empty string literal "". We use this ~70 times in the Civet grammar, mostly for declarative rules, which I imagine get hit a lot (you probably know better).
Given that it always matches, we shouldn't need to build/call $L at all. I think this optimization could be in compileOp but I haven't understood this code yet to know how to try it.
Here's a small idea for Hera optimization: skip matching the empty string literal
"". We use this ~70 times in the Civet grammar, mostly for declarative rules, which I imagine get hit a lot (you probably know better).Given that it always matches, we shouldn't need to build/call
$Lat all. I think this optimization could be incompileOpbut I haven't understood this code yet to know how to try it.