Thursday, April 24, 2025

The Digital Press

All the Bits Fit to Print

Ruby Web Development Artificial Intelligence Urban Planning Astronomy

Ruby Plans to Upstream New ZJIT Compiler by 2025

Proposal to integrate ZJIT, a next-generation Ruby JIT compiler, into the main Ruby repository

From Hacker News Original Article Hacker News Discussion

Ruby's YJIT team at Shopify is developing ZJIT, a next-generation Just-In-Time compiler that aims to improve performance and extensibility in Ruby 3.5. ZJIT introduces a more standard and modular compiler design using an SSA intermediate representation to enable advanced optimizations and easier community contributions.

Why it matters: ZJIT aims to outperform YJIT by enabling optimizations like aggressive inlining and reduced side-exits, improving Ruby execution speed.

The big picture: Moving to a method-based JIT with a textbook compiler architecture could foster broader Ruby core contributions and long-term maintainability.

Current status: ZJIT is early-stage, running microbenchmarks only, targeting feature parity with YJIT by Ruby 3.5 with an opt-in command-line switch.

Commenters say: The community appreciates the move to a more modular design, emphasizes challenges in profiling and optimization, and welcomes Matz's support for upstreaming.