News  

Ruby 3.1.0 released brings you a faster experimental JIT compiler

We ushered in the release of Ruby 3.1 this Christmas. It is an important feature version of this programming language. It introduces a wide range of compiler improvements while retaining compatibility with Ruby 3.0. The most exciting thing in Ruby 3.1 is “YJIT”, which is a brand new, experimental, in-process just-in-time compiler (JIT).

This new Ruby 3.1 JIT compiler is developed by Spotify and hopes to be used to improve the performance of its Ruby on Rails applications. YJIT is very helpful to improve the performance of Rail’s real-world applications.

Unlike Ruby’s existing MJIT compiler that uses an external C compiler, YJIT uses basic block version control and provides a JIT compiler internally. YJIT supports fast warm-up, which improves the performance of Railsbench by up to 22% and the performance of the liquid rendering test by up to 39%. However, it should be noted that YJIT is still considered experimental in Ruby 3.1 and is not enabled by default.

Ruby 3.1 also has rewritten debugger, IRB auto-complete support, minor language improvements, experimental IDE support for TypeProf static type analyzer, and some performance improvements to the existing MJIT compiler.

If you want to know more details about Ruby 3.1, please visit Ruby-Lang.org:

https://www.ruby-lang.org/en/news/2021/12/25/ruby-3-1-0-released/