Tartrazine::Rule
Inherits Tartrazine::BaseRule / Struct / Value / Object
=== 5. Allocation cuts in rule matching (perf only) ==================
Stock allocated [] of Token (and [] of Match inside BytesRegex)
on every failed rule attempt — one GC allocation per rule per
position scanned — plus a flat_map re-copy of the emitted tokens for
the overwhelmingly common single-action rule. Safe to drop without
affecting thread-safety.
Instance methods
match(text : Bytes, pos, tokenizer) : Tuple(Bool, Int32, Array(Token))
Source