mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
7675601b92
Cache OP_GETCONST results in a global direct-mapped cache (64 entries) keyed by (irep, sym). Invalidate all entries via a generation counter bumped on mrb_const_set(), mrb_const_remove(), and mrb_define_const_id(). ~10% faster on constant-heavy code; disabled with MRB_NO_CONST_CACHE. Co-authored-by: Claude <noreply@anthropic.com>