~/talk

Copy-and-Patch Just-in-Time Compiler for R

Talkat VMIL 2025 · on Wednesday, 2025-10-15· [compilers-and-language-design]
links:none on file
speakerdeck:fikovnik
name:Jan Vitek
linkedin:jvitek
slides:none on file

Implements a copy‑and‑patch baseline JIT for GNU R by extracting interpreter instruction bodies into stencils, emitting native code at runtime, and patching 30‑hole on average relocations; prototype compiles any R function on x86_64 Linux, needs ~1.2k C lines plus 2.5k bytecode ports and minor GNUR VM symbol exposure, compiles at 980 bytecode instructions/ms, achieves 1.15x–1.91x speedup (geomean 1.26x) and makes 82% of relocations relative so the approach is feasible and yields modest real‑world gains.

AI-written summary · about

  1. 0:00Introduction
  2. 1:04What makes R slow and hard to optimize
  3. 2:09Copy-and-patch JIT explained
  4. 4:18Stencil library runtime
  5. 6:44Adapting to R's bytecode
  6. 7:47Specializing constants
  7. 8:51Self-modifying for loops
  8. 12:26Handling x86-64 relocations
  9. 14:55Optimizing memory jumps
  10. 15:39Implementation details
  11. 16:22Benchmark setup results
  12. 18:31Versus CPython copy-and-patch
  13. 19:36Conclusion future work
  14. 19:56Q&A
~/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.