mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
726d8febf3
Pre-allocate visited array and thread lists at compile time and reuse them across re_exec calls. A cache_in_use flag detects re-entrancy and falls back to malloc when needed. Eliminates 3 malloc + 3 free per NFA execution for the common non-re-entrant case. Combined with the literal fast path, brings literal match? from 4.7x to 2.5x vs CRuby. Co-authored-by: Claude <noreply@anthropic.com>