Ruby 3.2 Unveils YJIT and WebAssembly: Boosting Performance by 41%
Ruby 3.2.0, released on December 25, introduces official WebAssembly support via WASI and the first production-ready version of YJIT—a new JIT compiler from Shopify—delivering up to a 41% speed boost over the traditional interpreter, while also enhancing Regexp performance dramatically.
Ruby’s core team released Ruby 3.2.0 on December 25, offering initial WebAssembly support via WASI and the first non‑experimental version of YJIT, a new JIT compiler that provides roughly a 41 % speed increase over the traditional interpreter.
YJIT was started by Shopify with assistance from GitHub; Shopify describes itself as a large server‑infrastructure company powered by Ruby on Rails.
CRuby already includes MJIT, a method‑based JIT, but its performance gains have been limited in broader workloads.
YJIT is built on a Basic Block Versioning architecture, originating from Chevalier‑Boisvert’s PhD research, and aims to eventually replace most of the interpreter. Ruby 3.2.0 now supports both YJIT and MJIT.
YJIT has become an official part of Ruby; after more than a year of production testing it is considered stable and runs on Linux, macOS, BSD and other Unix‑like platforms, supporting x86‑64 and Arm64.
A year ago YJIT was ported to Rust because maintaining a JIT in C99 proved challenging due to limited tooling for managing complexity.
Another major feature of Ruby 3.2.0 is WebAssembly support based on WASI.
This enables CRuby binaries to run in web browsers, server‑less edge environments, or other WebAssembly/WASI‑enabled devices, providing a “Try Ruby” playground that executes Ruby in the browser.
However, WebAssembly still lacks some capabilities needed for Fiber, exception handling, and garbage collection, as the technology continues to evolve.
Ruby 3.2 also upgrades its Regexp engine, delivering dramatic speed gains—for example, a pattern that took 10 seconds in Ruby 3.1 now finishes in 0.003 seconds.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
21CTO
21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
