Ruby Lands "YJIT" As A Speedy, In-Process JIT Compiler

Written by Michael Larabel in Programming on 21 October 2021 at 12:00 AM EDT. 19 Comments
PROGRAMMING
The Ruby programming language implementation has merged YJIT, its new just-in-time (JIT) compiler.

YJIT is a JIT compiler for Ruby that leverages the lazy Basic Block Versioning (LBBV) architecture. YJIT has been in the works for a number of years. Most exciting for end-users and developers is that YJIT yields an average speed-up of around 23% compared to the current CRuby interpreter for realistic benchmarks.

With Ruby 3.1 the plan is to include it as a preview release to help test it and enjoy the performance gains, but it is currently disabled by default. The "--yjit" or "YJIT_RUBY_ENABLE=1" options are needed to currently enable this Ruby JIT. YJIT additionally supports just Linux and macOS platforms so far on x86-64 CPUs. Unsupported platforms will see the conventional Ruby interpreter used.

More details on Ruby's YJIT that was merged on Wednesday can be found via its merge request.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week