2

Ruby previews pure Ruby JIT compiler

 11 months ago
source link: https://www.infoworld.com/article/3696968/ruby-previews-pure-ruby-jit-compiler.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Ruby previews pure Ruby JIT compiler

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.

By Paul Krill

Editor at Large,

InfoWorld | May 17, 2023 2:00 pm PDT

Ruby, gem, programming language - shutterstock

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 is an editor at large at InfoWorld, whose coverage focuses on application development.

Copyright © 2023 IDG Communications, Inc.

Sponsored Links


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK