Paul Krill
Editor at Large

Ruby previews pure Ruby JIT compiler

news
May 17, 20232 mins

Ruby 3.3.0 brings significant performance improvements to YJIT and previews RJIT, an experimental just-in-time compiler that doesn’t require a C compiler at runtime.

Ruby, gem, programming language - shutterstock
Credit: Finesell/Shutterstock

Ruby 3.3.0, a planned upgrade to the popular dynamic language, introduces an experimental, pure-Ruby, just-in-time compiler, called RJIT. The update also brings a number of improvements and a performance boost to the YJIT compiler.

A first preview of Ruby 3.3.0, unveiled May 12, can be downloaded from ruby-lang.org. RJIT, not now usable for production purposes, replaces the MJIT (Method-based Just in Time) compiler. Unlike MJIT, RJIT does not require a C compiler at runtime. Ruby developers should continue to use the Shopify-built YJIT (Yet Another Ruby JIT) compiler in production.

YJIT offers significant performance improvements in Ruby 3.3.0, Ruby proponents said. Registers are allocated for stack operations of the virtual machine and more calls with optional arguments are compiled. Metadata for compiled code uses much less memory, and code generation on the Arm64 architecture has been improved. YJIT now can be started in a paused mode and enabled manually when an application is done booting. Finally, YJIT’s exit tracing option now supports sampling.

Elsewhere in Ruby 3.3.0, defined?(@ivar) has been optimized with Object Shapes to improve performance, and a number of default gems in the standard library have been updated including RubyGems, bigdecimal, bundler, and syntax_suggest.

The current version of Ruby, Ruby 3.2.2, announced March 30, brought security fixes. Ruby 3.2.0, which arrived on Christmas Day, featured WASI (WebAssembly System Interface) support.

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