Paul Krill
Editor at Large

Ruby tees up new JIT compiler

news
Nov 11, 20212 mins

Shopify-built YJIT compiler promises to bring faster warmup and higher performance to Ruby on Rails apps.

ruby
Credit: Thinkstock

Ruby, the popular dynamic programming language that is now more than a quarter-century old, is set to add a performance-boosting, just-in-time compiler with the planned 3.1.0 version.

Now in an initial preview as of November 9, Ruby 3.1.0 is downloadable from the project website. Ruby 3.1.0 integrates YJIT (Yet Another Ruby JIT), an in-process JIT compiler developed by Shopify. YJIT still is an experimental feature.

The developers of Ruby describe YJIT as an important contribution that is intended to improve Ruby on Rails application performance. YJIT is a basic block versioning JIT compiler that achieves both fast warmup and performance improvements on most real-world software, a ruby-lang.org blog post said.

YJIT is disabled by default at this stage. Developers who want to enable it it must specify the --yjit command-line option. YJIT is currently limited to MacOS and Linux on x86-64 platforms. Also in Ruby 3.1.0:

  • The debug.gem debugger replaces the lib/debug.rb standard library, promising faster debugging and capabilities such as remote debugging, colorful REPL and Visual Studio Code.
  • A built-in gem, error_highlight, brings fine-grained error location in backtrace.
  • For the language itself, values in Hash literals and keyword arguments can be omitted.
  • The pin operator in pattern matching now takes an expression.
  • Updates to the RBS language for describing the structure of Ruby programs include rbs collection, to manage gems’ RBSs, and updates and additions to signatures for built-in and standard libraries. Bug fixes and performance improvements also have been made to RBS.
  • The TypeProf static type analyzer has been updated with experimental IDE support as well as bug fixes and performance improvements.
  • Performance of the MJIT compiler has been improved.

Ruby 3.0.0, featuring parallel execution, arrived last Christmas.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author