Ruby 3.4 Improves YJIT |
Written by Kay Ewbank | |||
Monday, 06 January 2025 | |||
Ruby 3.4 has been released. This version uses the Prism parser as the default, adds an "it" block parameter reference and brings Happy Eyeballs Version 2 support to the socket library. Ruby is a high-level language drawing on elements of Perl, Smalltalk, Eiffel, Ada, and Lisp and supporting multiple programming concepts to balance functional, dynamic and object oriented programming. Fans say it is fun to use as well as useful. The first main change to this version is the addition of an it default block parameter. This can be used to reference a block parameter with no variable name. The new version has switched to use Prism as the default parser. The team says this is an internal improvement and there should be little or no change visible to the user. Another improvement in this version is that the socket library now features Happy Eyeballs Version 2. This is the latest standardized version of a widely adopted approach for better connectivity in many programming languages, in TCPSocket and Socket.tcp. The developers say the change enables Ruby to provide efficient and reliable network connections, adapted to modern internet environments. YJIT has also been improved. YJIT is a lightweight, minimalistic Ruby JIT built inside CRuby. It lazily compiles code using a Basic Block Versioning (BBV) architecture. The improvements in this release provide better performance across most benchmarks on both x86-64 and arm64 platforms, and reduced memory usage through compressed metadata and a unified memory limit. The final change of note is a move to a modular garbage collector. The alternative garbage collector implementations can be loaded dynamically through the modular garbage collector feature. Ruby's built-in garbage collector has been split into a separate file and interacts with Ruby using an API. The built-in garbage collector can now also be built as a library, and an experimental GC library has been added based on MMTk. Ruby 3.4 release candidate is available now. More InformationRelated ArticlesRuby 3.3 Makes Prism Parser Default Ruby 3.2 Adds WebAssembly Support Ruby 3.1 Adds In-Process JIT Compiler Ruby 3 Released Offering Three Times Better Performance To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
Comments
or email your comment to: comments@i-programmer.info |
|||
Last Updated ( Monday, 06 January 2025 ) |