~/talk

Compiling Ruby to Native Code with Sorbet & LLVM

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

Stripe builds an ahead‑of‑time compiler that takes Sorbet’s type‑checked control‑flow graph and emits LLVM IR to produce shared objects that call the Ruby C API, avoiding VM dispatch by inlining array/hash operations and blocks. Files opt in with a compiled sigil and the pipeline inserts runtime type assertions so LLVM can remove redundant checks. Rollout is incremental with test suites, staging, blue/green deploys, and observed production wins of 22–170% improvement on measured workloads using Sorbet and LLVM.

AI-written summary · about

  1. 0:00Introduction
  2. 0:23Sorbet definition
  3. 1:40Agenda
  4. 3:46Speeding the API
  5. 5:55Alternative Ruby implementations
  6. 7:00LLVM vs JIT
  7. 8:39How Sorbet works
  8. 17:01Sorbet at Stripe
  9. 17:41Three main goals
  10. 18:18Line of defense
  11. 20:54Stack Prof
  12. 21:58Next Steps
  13. 22:44Questions
~/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.