Compiling Ruby scripts
summary
Ruby VM now serializes instruction sequences to disk with iseq.to_binary and reloads them with load_from_binary, aiming for an ahead-of-time compiler to cut boot and multi-process memory costs. Implementation adds a loader hook for custom storage (file, DBM, repo) and lazy-loading of iseqs. Results: cold load of a large stdlib file drops from ~13.2s to 3.9s (2.4s with preloaded binary); produced binaries are large (~337 KB each) and memory sharing is not yet solved.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 5:59Compiling Ruby scripts
- 14:57Implementation and lazy loading
- 20:16API and file management
- 28:21Experimental results
- 31:56Summary and future work
- 32:38Q&A








