(Re)make Regexp in Ruby: Democratizing internals for the JIT
summary
Rebuild of Onigmo, named Narak, produces a full Ruby-aware regex parser and a prototype pure-Ruby matcher that tests JIT tradeoffs. The parser is done and a Ruby engine prototype runs with limited features; Narak parser implemented. YJIT speeds the pure Ruby engine about 3–5×, ZJIT about 1.4–1.7×. Native C Onigmo still beats the naive Ruby prototype by 20–60×, but ahead-of-time DFA codegen evaluated into Ruby reaches about 15× faster than Onigmo.
AI-written summary · about
chapters (7)
- 0:00Introduction and background
- 4:52Why rewrite Onigmo
- 12:42Narak project goals
- 19:41Current Narak status
- 20:47Ruby JIT regex experiment
- 25:11Future Narak plans
- 29:42Conclusion and next steps
related talks
24mJust-in-Time Compiling Ruby Regexps on TruffleRuby
20mBYOJ: Build your own JIT with Ruby
43mGrammars, Parsers, and Interpreters, In Ruby
32mExperiments in sharing Java VM technology with CRuby
30mYJIT - Building a new JIT Compiler inside CRuby
29mRuby Internals: A Guide For Rails Developers
20mEvaluating YJIT’s Performance in a Production Context: A Pragmatic Approach
39mRegular Expressions Inside Out
