---
title: "Ruby 3.2’s YJIT is Production-Ready"
description: "Ruby 3.2 makes YJIT, Shopify’s just-in-time compiler for CRuby, substantially more suitable for production after its experimental Ruby 3.1 release. The project was ported from C99 to Rust for stronger safety guarantees and better abstractions, while memory work reduced overhead to approximately one third of the Ruby 3.1 level through metadata optimization, machine-code garbage collection, and lazy page allocation. YJIT 3.2 speeds railsbench by about 38% over the Ruby 3.2 interpreter, or 57% over the Ruby 3.1.3 interpreter, and adds native ARM64 support for Apple M1/M2, AWS Graviton, and Raspberry Pi. Shopify has deployed it across its Storefront Renderer infrastructure, measuring real-world speedups of 5% to 10%, while identifying memory footprint and method-call optimization as continuing priorities."
---

# Ruby 3.2’s YJIT is Production-Ready

[Shopify](https://yomu.fyi/company/shopify) · 2023-10-18 · Jan 17, 2023

**Type:** Announcement

## Summary

Ruby 3.2 makes YJIT, Shopify’s just-in-time compiler for CRuby, substantially more suitable for production after its experimental Ruby 3.1 release. The project was ported from C99 to Rust for stronger safety guarantees and better abstractions, while memory work reduced overhead to approximately one third of the Ruby 3.1 level through metadata optimization, machine-code garbage collection, and lazy page allocation. YJIT 3.2 speeds railsbench by about 38% over the Ruby 3.2 interpreter, or 57% over the Ruby 3.1.3 interpreter, and adds native ARM64 support for Apple M1/M2, AWS Graviton, and Raspberry Pi. Shopify has deployed it across its Storefront Renderer infrastructure, measuring real-world speedups of 5% to 10%, while identifying memory footprint and method-call optimization as continuing priorities.

## Context

Shopify runs large-scale infrastructure built on Ruby and Ruby on Rails, including the Storefront Renderer, which serves more than 75 million requests per minute. YJIT 3.1 had significant memory overhead and was still experimental, making global deployment difficult. Shopify used limited production deployment to gather real-world statistics and expose issues that benchmarks did not reveal.

## Approach / What changed

YJIT was ported from C99 to Rust, then improved through more compact metadata, garbage collection for unused machine code, and lazy allocation of machine-code pages. Ruby 3.2 also adds a multi-platform backend with native ARM64 support, object shapes for faster instance-variable access, YJIT exit tracing, finer-grained constant-cache invalidation, and other interpreter and garbage-collector improvements.

## Takeaways

- YJIT’s Ruby 3.2 memory overhead was reduced to approximately one third of its Ruby 3.1 level through metadata optimization, machine-code garbage collection, and lazy page allocation.
- On railsbench, YJIT 3.2 is about 38% faster than the Ruby 3.2 interpreter and 57% faster than the Ruby 3.1.3 interpreter.
- Ruby 3.2 enables native YJIT execution on Apple M1/M2, AWS Graviton 1/2, and Raspberry Pi hardware, rather than requiring x86-64 support or Rosetta emulation.

**Tags:** [Deployment](https://yomu.fyi/topic/deployment), [Performance](https://yomu.fyi/topic/performance), [Rust](https://yomu.fyi/topic/rust)

- Source: [Shopify](https://shopify.engineering/ruby-yjit-is-production-ready)
- Source URL: https://shopify.engineering/ruby-yjit-is-production-ready
- Ingested by Yomu: 2026-08-30T13:36:13.369Z

[Read original post](https://shopify.engineering/ruby-yjit-is-production-ready)
