---
title: "Year in Review 2022: Tenderlove's Ruby and Rails Reflections and Predictions"
description: "Ruby's 2022 highlights include YJIT's rewrite in Rust and its new ARM support, so `ruby --yjit` now runs on Apple Silicon development machines as well as production."
url: "https://swe.quest/articles/year-in-review-2022-tenderlove-s-ruby-and-rails-reflections-and-predictions-d873d71ac3e91545"
canonical: "https://shopify.engineering/ruby-rails-year-in-review-2022"
source: "Shopify Engineering"
published: "2022-12-22"
difficulty: "easy"
kind: "Opinion"
reading_minutes: 8
tags: ["ruby","runtimes","memory-management","developer-tools","compilers"]
---

# Year in Review 2022: Tenderlove's Ruby and Rails Reflections and Predictions

A post on [Shopify Engineering](https://swe.quest/sources/shopify.md), published 2022-12-22, 8 min read, Opinion. Original: [https://shopify.engineering/ruby-rails-year-in-review-2022](https://shopify.engineering/ruby-rails-year-in-review-2022)

## Summary

Ruby's 2022 highlights include YJIT's rewrite in Rust and its new ARM support, so \`ruby --yjit\` now runs on Apple Silicon development machines as well as production. Variable Width Allocation became the default: Ruby learns when a class needs more instance-variable slots than the fixed 40-byte object provides and allocates later instances from wider slot pools, which improves cache locality. Ruby 3.2's Object Shapes give inline caches a class-independent key based on which instance variables were set and in what order, which helps deep hierarchies like Active Record. On the tooling side, Ruby LSP brings editor features to Ruby, and Error Highlight's column-level error pointers now appear on Rails error pages, part of a broader push for developer ergonomics in 2023.

Written by swe.quest, not by the author.

**Difficulty:** Easy: no special background needed; explains what something is and why it matters

## Topics

- [Ruby](https://swe.quest/tags/ruby.md) (Languages)
- [Runtimes & VMs](https://swe.quest/tags/runtimes.md) (Compilers & runtimes)
- [Memory management](https://swe.quest/tags/memory-management.md) (Compilers & runtimes)
- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)
- [Compilers](https://swe.quest/tags/compilers.md) (Compilers & runtimes)

## Prerequisites

- Ruby basics ([easy posts on Ruby](https://swe.quest/tags/ruby.md?difficulty=easy))
- JIT compilation concepts ([easy posts on Compilers](https://swe.quest/tags/compilers.md?difficulty=easy))

## Keywords

YJIT, Variable Width Allocation, Object Shapes, Ruby LSP, Error Highlight, Ruby 3.2, Rails

## Related posts

- [Ruby 3.2’s YJIT is Production-Ready](https://swe.quest/articles/ruby-3-2-s-yjit-is-production-ready-05f17a68a56ea05c.md): Shopify Engineering · 2023-01-17 · Easy · 10 min read · Ruby, Compilers, Runtimes & VMs, Performance engineering, Rust
  YJIT, Shopify's JIT compiler for CRuby, became production-ready in Ruby 3.2 after a port from C99 to Rust and a cut in memory overhead to about a third of Ruby 3.1 levels.
- [Optimizing Ruby’s Memory Layout: Variable Width Allocation](https://swe.quest/articles/optimizing-ruby-s-memory-layout-variable-width-allocation-7db49cee151f4d44.md): Shopify Engineering · 2022-12-25 · Hard · 13 min read · Memory management, Ruby, Runtimes & VMs, Performance engineering
  Ruby 3.2's Variable Width Allocation replaces CRuby's single 40-byte RVALUE slot with five size pools (40, 80, 160, 320 and 640 bytes) so classes, strings, arrays and objects can store their data adjacent to the object instead of in separate malloc'd memory.
- [YJIT: Building a New JIT Compiler for CRuby](https://swe.quest/articles/yjit-building-a-new-jit-compiler-for-cruby-51c5ee3c390b2164.md): Shopify Engineering · 2021-10-14 · Easy · 6 min read · Compilers, Ruby, Runtimes & VMs, Performance engineering
  YJIT is a new JIT compiler built inside CRuby by Shopify and GitHub engineers, based on Basic Block Versioning, and aimed at real-world workloads like Rails where the GCC-based MJIT has struggled.
- [Our Experience Porting the YJIT Ruby Compiler to Rust](https://swe.quest/articles/our-experience-porting-the-yjit-ruby-compiler-to-rust-221d770c36dd7d35.md): Shopify Engineering · 2022-05-11 · Medium · 16 min read · Rust, Compilers, Ruby, Refactoring & migrations, C & C++
  Shopify's YJIT team ported the CRuby JIT compiler from about 11,000 lines of C99 to Rust because C's lack of modules, generics, containers and safe macros made a growing compiler hard to manage.
- [Try Out YJIT for Faster Rubying](https://swe.quest/articles/try-out-yjit-for-faster-rubying-6105453188fbb741.md): Shopify Engineering · 2021-10-15 · Medium · 7 min read · Ruby, Compilers, Runtimes & VMs, Performance engineering
  YJIT, Shopify's just-in-time compiler built into CRuby and slated for Ruby 3.1, compiles frequently used Ruby code to native machine code, speeding up a simple Rails benchmark by 20% or more and a real Shopify web service by about 6% on canary traffic.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
