[ruby-talk:444806] [ANN] JRuby 10.1.0.0 Released

The JRuby community is pleased to announce the release of JRuby 10.1.0.0.

  - Homepage: https://www.jruby.org/
  - Download: Downloads — JRuby.org

JRuby 10.1.0.x targets Ruby 4.0 compatibility.

Thank you to our contributors this release, you help keep JRuby moving
forward!
JRuby 10.1: Experimenting and Evolving

JRuby 10.1.0.0 is our first major release since catching up with Ruby
compatibility. We have used this opportunity to explore many experimental
optimizations and improvements we have been chasing for many years. Ruby
4.0 compatibility is largely complete, but there will be additional
features added in update releases. We also plan to continue with large
scale experiments in subsequent updates, and recommend production users
continue to use JRuby 10.0 while we work toward stabilization of the 10.1
series.

Here’s an overview of the major enhancments already in JRuby 10.1.0.0 and
others planned for update releases in the coming months.

Reduced Object Size

In JRuby 10.1 all objects have been reduced in size by 8 bytes, bringing
the base object size down from 32 bytes to 24 bytes. This translates into
smaller objects across the system, reduced GC load, higher allocation
throughput, and better cache locality.

On JVM versions that support Compact Object Headers (JEP 450: “Project
Lilliput”) the base object size can be further reduced to 16 bytes, 40%
smaller than objects in the standard Ruby implememtation.

Evolving Strings, Arrays, and Hashes

During the upcoming JRuby 10.1 update releases, we plan to introduce new
versions of String, Array, and Hash that are optimized for memory
compactness, concurrency, or integration with other JVM languages. To
support these features, we have made the internal implementations RubyArray
and RubyHash into abstract classes and deprecated the direct constructors
for RubyString. Please test your JRuby extension code and make sure it does
not call abstract or deprecated constructors.

Smaller Numeric Representations

JRuby’s internal class for representing 64-bit signed Integer values,
RubyFixnum, has been split into two versions: LongFixnum and ShortFixnum.
Combined with the reduced size of objects overall, this reduces the size of
these long and short-ranged Integer objects from 40 bytes to 32 bytes or 24
bytes (24 bytes or 16 bytes if using Compact Object Headers). The size of
Float objects have similarly been reduced from 40 bytes to 32 bytes. These
size reductions help improve the performance of numeric algorithms and
reduce impact to the heap and GC of boxing numeric values.

Cross-platform Prism Parser

JRuby 10.1 ships with support for the Prism Ruby parser, packaged as a set
of pre-optimized native builds (for Windows, Linux, and MacOS on x86_64 or
arm64) or as a WASM build on other platforms. We’re still working out a few
remaining features, but we encourage experimenters to enable it by passing
-Xparser.prism to JRuby. We plan to make this the default parser once the
remaining issues are solved.

Direct Argument Passing

We have also laid the groundwork to start passing all forms of method
arguments on the call stack, avoiding boxed collections for most optional
and keyword arguments. In upcoming JRuby 10.1 releases, we will begin to
connect these call paths up for both pure-Ruby and native (Java) method
targets, eliminating box allocation and drastically improving the
peformance of such forms. Watch this space for rapid improvements.
New Policy for EOL and LTS Releases

With the release of JRuby 10.1, we are moving JRuby 9.4 into a “soft” EOL
status. This means we will no longer be doing regular OSS release updates
of JRuby 9.4, but users may get in contact with us to sponsor continued
support. JRuby 10.0 will be our stable LTS release until April 2028 and we
recommend all users upgrade or get in contact with us for assistance. JRuby
10.1 will be our “tip” release line, with many exciting optimizations and
enhancements due to land over the next several months.

Going forward, we will provide a new LTS baseline release every two years,
starting in spring of 2027, and alternating years will be considered as
edge or development versions without LTS guarantees. This will allow us a
free hand to keep bringing you more experimental features while still
providing a stable baseline for more conservative users.
Try JRuby Today!

Users can install JRuby 10.1 through the usual means, and we encourage you
to give it a try and let us know how it handles your applications and
libraries. We have much more planned for the 10.1 updates and hope to move
fast and push the edges of what’s possible with Ruby on the JVM.

59 Issues and PRs resolved for 10.1.0.0
    #8716 dup a lot
    #8747 Launcher script chokes on GraalVM release file
    #9055 Array experiments
    #9066 Move Set to a core class [Ruby 4.0]
    #9069 Implement Ruby 4.0 support
    #9074 Avoid array allocation for *nil, by not calling nil.to_a
    #9075 Selective inspect of instance variables
    #9077 No numbered parameters in Binding#local_variables
    #9078 Add Math.{expm1,log1p}
    #9079 Align IO.select timeout logic with CRuby
    #9083 Implement missing raise features
    #9085 Specialize Fixnum
    #9090 Reduce the size of the varTableStamp
    #9091 Shrink varTableStamp
    #9095 Eliminate global flags
    #9096 Cache object ID and hash in low-count immediate values
    #9102 Add a fast path for hashing numerics and immediates
    #9113 Performance regression in RubyHash for large hashes (~8-10x
slower than JRuby 1.7)
    #9119 Implement fast-path builtin method flags
    #9123 Fast builtin validation experiment
    #9124 Reduce load factor for Hash from 5 to 2
    #9136 Marshal.load 2.9x regression vs JRuby 1.7
    #9143 Cache both hash forms for FString
    #9148 Allow logical ops to begin on beginning of next line
    #9154 Mask internal Ruby backtrace elements like native masking
    #9156 Small marshal fixes
    #9174 Add complete thread-local builtin tracking system (Issues #9116,
#9119)
    #9180 Implement implicit param logic for Binding
    #9181 Fix Data subclasses with ivars
    #9202 A Data object should be frozen even if it has no members
    #9209 Add ruby_bug for spec of Data with no members being frozen
    #9210 Remove Process::Status#& and Process::Status#»
    #9233 Load boot scripts from classloader URI
    #9235 Use capitalized Class and Module for frozen errors
    #9236 [Properly handle keywords in {Kernel Thread Fiber}#raise]#9236
    #9238 Cloned class’s singleton class has too many classes in hierarchy
    #9239 Fix for cloned class singleton class has too many ancestors
    #9250 Update Unicode to Version 17.0.0 and Emoji Version 17.0
    #9262 Abstract RubyHash
    #9263 Implicit param fixes for proc and binding
    #9266 Endless method with modifier method does not parse
    #9273 Cleanup recursion guards
    #9277 Use live counts for event hook stats
    #9279 Move fiddle back to default temporarily for resolv
    #9286 Proposing RISC-V architecture support
    #9287 Add riscv64 platform support
    #9298 Ensure we have a classloader to boot from
    #9299 Delete methods deprecated prior to JRuby 9.4.0.0
    #9300 Replace now-deprecated wait_timeout
    #9313 Time being returned as ASCII-8BIT encoding in JRuby 10
    #9318 Process.detach raises ArrayIndexOutOfBoundsException if called
from a thread that is not the main thread
    #9325 [fix] NullPointerException from closed IO
    #9362 Allow endless methods to be an argument to methods like visibity
    #9365 Marshal load perf
    #9371 Deprecate all public RubyString constructors
    #9374 Integrate WASM-based Prism parser into standard build
    #9383 Disable IntFixnum
    #9384 Set.new(a_set) throws LocalJumpError
    #9385 Fixes #9384. Set.new(a_set) throws LocalJumpError

···

--
blog: http://blog.enebo.com twitter: tom_enebo
mail: tom.enebo@gmail.com