22 Dec

Ruby 3.3.0 Approaches Launch with Revolutionary Parser

    The forthcoming update to the dynamic Ruby language, Ruby 3.3.0, is poised for release, featuring a groundbreaking parser among other notable enhancements. As of December 11, the release candidate stage, RC1, has been unveiled and is accessible through ruby-lang.org.

    A significant inclusion in Ruby 3.3.0 is the integration of the Prism parser as a default gem. Prism stands out as a portable, fault-tolerant, and maintainable recursive-descent parser tailored for the Ruby language. Serving as a C library, Prism offers an alternative to Ripper.

    Another noteworthy addition to Ruby 3.3.0 is the Lrama LALR parser generator, designed to deliver an error-tolerant parser for CRuby with minimal modifications to the CRuby parse.y file. Other key features of Ruby 3.3.0 encompass:

    • The introduction of the pure-Ruby RJIT Ruby JIT compiler, which supplants MJIT. Although still in the experimental phase, RJIT is positioned for potential production use, with YJIT recommended for current production scenarios.
    • Substantial performance enhancements and memory usage improvements in YJIT over Ruby 3.2, solidifying its viability for production environments.
    • The debut of the M:N thread scheduler, enhancing the efficiency of thread management.
    • Optimization of defined?(@ivar) for improved performance using Object Shapes.
    • Enhanced garbage collector performance to bolster overall system efficiency.
    • Adoption of Variable Width Allocation in most core classes, including Hash, Time, Thread::Backtrace, Thread::Backtrace::Location, File::Stat, and Method. This strategic move accelerates class allocation and deallocation, resulting in reduced memory usage and diminished heap fragmentation.

    Post RC1 release, Ruby’s development team commits to minimizing the introduction of ABI (application binary interface) incompatibilities. Notably, the precursor, Ruby 3.2.2, was released on March 30, focusing on security fixes.

    Share this