Ruby 3.2’s YJIT is Production-Ready - Shopify
Jan 17, 2023

Summary
This post details significant improvements to YJIT in Ruby 3.2, including a port to Rust for better maintainability and safety, reduced memory usage (cut by approximately one third), improved performance (38% speedup on railsbench over the interpreter), and the addition of ARM64 support. It also highlights additional improvements like object shapes for faster instance variable access, YJIT exit tracing, improved method call support, finer-grained constant cache invalidation, and variable width allocation for objects. Shopify has successfully deployed YJIT globally on its SFR infrastructure, measuring real speedups of 5% to 10%.
More from the YJIT Compiler for Ruby trail
- Contributing support for a Wasm instruction to Winch - Shopify
- Year in Review 2022: Tenderlove's Ruby and Rails Reflections and Predictions - Shopify
- When is JIT Faster Than A Compiler? - Shopify
- Shopify Invests in Research for Ruby at Scale - Shopify
- Our Experience Porting the YJIT Ruby Compiler to Rust - Shopify