~/talk

From Interpreting C Extensions to Compiling Them

Talkat RubyKaigi 2024 · 2024-05-15..05-17· [ruby, compilers-and-language-design]
slides:none on file

TruffleRuby implements C extensions three ways: interpreting C with Sulong (LLVM bitcode, inline across C↔Ruby) which yields up to ~3× speed when inlining but needs long warmup, and compiling extensions natively with clang which gives much faster startup and lets grpc and a 7,000‑line YAML parser run without JIT stalls. Tooling tradeoffs: JVM JNI/legacy FFI (lii) is slow, Java Panama is much faster. Claim: top‑10k gems have ~46% transitive native deps and TruffleRuby passes ~98% of C API specs.

AI-written summary · about

  1. 0:00Introduction and speaker background
  2. 3:56Purpose and usage of C extensions
  3. 7:48Truffle framework and initial approach
  4. 15:18Transition to compiling C extensions
  5. 21:12Pros and cons of the extension API
  6. 24:02Performance benchmarks overview
  7. 30:28Conclusion and compatibility importance
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.