~/talk

Making the RBS Parser Faster

Talkat RubyKaigi 2026 · 2026-04-22..04-24· [ruby]
slides:none on file

RBS parser work focuses on concrete wins: lexer byte-width caching speeds core RBS parsing ~16% and fixes non-UTF-8 behavior, and switching the arena from mmap to a malloc-based arena eliminates repeated page faults so the new C parser runs up to 1.67× faster than RBS 3.9 overall and recovers a ~10× slowdown on many tiny inputs. Investigation uses Instruments profiler and a re2c lexer; benchmarks cover core, Steep, Rails timing, and smallest/ largest file sets.

AI-written summary · about

  1. 0:00Introduction and updates
  2. 5:11RBS parser overview
  3. 9:25Profiling and lexer issues
  4. 15:15Encoding and lexer fixes
  5. 19:31Custom allocator optimization
  6. 25:15Final performance results
  7. 26:59Conclusion and future
~/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.