Precompiling Ruby scripts - Myth and Fact
summary
Ruby 2.3 adds precompilation primitives for RubyVM::InstructionSequence and provides methods like InstructionSequence#to_binary and load_from_binary; a sample controller, Yomikomu.gem (with kakidasu for baking binaries), implements multiple storages and lazy loading. Microbenchmarks show up to 5× faster repeated requires but compiled binaries swell ~5×; a Rails boots test halves parse/compile time yet only slightly trims overall startup because other work consumes ~60–70% of time. Precompilation helps some hotspots but is not a silver bullet.
AI-written summary · about
chapters (6)
- 0:00Start
- 0:05Precompiling Ruby Scripts - Myth and Fact
- 4:02Mission of Heroku Matz's team Design Ruby language and improve quality of MRI
- 7:08Compilers for interpreters • JIT (just in time) compilers Compile to more efficient code at runtime - Runtime statistics information are available • AOT (ahead of time) compilers
- 21:22How to store compiled binary? Compile timing - Use compiler explicitly Loading time
- 28:39Usage of Yomikomu 3 steps (1) Set configuration with environment variables Storage options and so on. See documents for details (2) Compile Ruby scripts with "kakidasu" command








