~/talk

Just-in-Time Compiling Ruby Regexps on TruffleRuby

Talkat RubyConf 2021 · 2021-11-08..11-10· [ruby]
slides:none on file

TruffleRuby uses Truffle Regex to just-in-time compile Ruby regexps to machine code via GraalVM, replacing backtracking engines like onigmo/joni with finite-state machines and per-state inlined loop bodies. Microbenchmarks show up to 40× faster and larger workloads 2.3–9× speedups; unsupported features fall back to joni/backtracking and emit warnings. The implementation avoids REDoS by providing linear-time matching and unrolls counted quantifiers while tracking capture boundaries.

AI-written summary · about

  1. 0:00Introduction
  2. 0:27TruffleRuby
  3. 0:53Background on regex engines
  4. 2:25What is TruffleRuby
  5. 3:50Regular Expressions
  6. 4:51TRegex
  7. 6:43Infinite Quantifiers
  8. 7:20Capture Groups
  9. 8:02Supported Features
  10. 9:47Unsupported Features
  11. 11:31The Loop
  12. 12:42State Machine
  13. 14:35Performance
  14. 14:58Micro benchmarks
  15. 16:32Larger benchmarks
  16. 17:49Liquid Powers
  17. 18:50Regular Expression Denial of Service
  18. 20:31Atomic Groups
  19. 22:17Conclusion
  20. 23:01Outro
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.