Added YJIT entries from draft of release announcement

This commit is contained in:
Hiroshi SHIBATA 2024-12-17 12:32:21 +09:00
parent 9f0b84ee45
commit 9a52902490
No known key found for this signature in database
GPG Key ID: F9CF13417264FAC2

27
NEWS.md
View File

@ -360,13 +360,13 @@ details of the default gems or bundled gems.
* The default parser is now Prism. * The default parser is now Prism.
To use the conventional parser, use the command-line argument `--parser=parse.y`. To use the conventional parser, use the command-line argument `--parser=parse.y`.
[[Feature #20564]] [[Feature #20564]]
* Happy Eyeballs version 2 (RFC8305), an algorithm that ensures faster and more reliable connections * Happy Eyeballs version 2 (RFC8305), an algorithm that ensures faster and more reliable connections
by attempting IPv6 and IPv4 concurrently, is used in Socket.tcp and TCPSocket.new. by attempting IPv6 and IPv4 concurrently, is used in Socket.tcp and TCPSocket.new.
To disable it globally, set the environment variable `RUBY_TCP_NO_FAST_FALLBACK=1` or To disable it globally, set the environment variable `RUBY_TCP_NO_FAST_FALLBACK=1` or
call `Socket.tcp_fast_fallback=false`. call `Socket.tcp_fast_fallback=false`.
Or to disable it on a per-method basis, use the keyword argument `fast_fallback: false`. Or to disable it on a per-method basis, use the keyword argument `fast_fallback: false`.
[[Feature #20108]] [[Feature #20782]] [[Feature #20108]] [[Feature #20782]]
* Array#each is rewritten in Ruby for better performance [[Feature #20182]].
* Alternative garbage collector (GC) implementations can be loaded dynamically * Alternative garbage collector (GC) implementations can be loaded dynamically
through the modular garbage collector feature. To enable this feature, through the modular garbage collector feature. To enable this feature,
@ -385,7 +385,30 @@ details of the default gems or bundled gems.
enabled using the environment variable `RUBY_GC_LIBRARY=mmtk`. This requires enabled using the environment variable `RUBY_GC_LIBRARY=mmtk`. This requires
the Rust toolchain on the build machine. [[Feature #20860]] the Rust toolchain on the build machine. [[Feature #20860]]
## JIT * New features of YJIT
* Add unified memory limit via `--yjit-mem-size` command-line option (default 128MiB)
which tracks total YJIT memory usage and is more intuitive than the
old `--yjit-exec-mem-size`.
* More statistics now always available via `RubyVM::YJIT.runtime_stats`
* Add compilation log to track what gets compiled via `--yjit-log`
* Tail of the log also available at run-time via `RubyVM::YJIT.log`
* Add support for shareable consts in multi-ractor mode
* Can now trace counted exits with `--yjit-trace-exits=COUNTER`
* Compressed context reduces memory needed to store YJIT metadata
* New optimizations of YJIT
* Improved allocator with ability to allocate registers for local variables
* When YJIT is enabled, use more Core primitives written in Ruby:
* `Array#each`, `Array#select`, `Array#map` rewritten in Ruby for better performance [[Feature #20182]].
* Ability to inline small/trivial methods such as:
* Empty methods
* Methods returning a constant
* Methods returning `self`
* Methods directly returning an argument
* Specialized codegen for many more runtime methods
* Optimize `String#getbyte`, `String#setbyte` and other string methods
* Optimize bitwise operations to speed up low-level bit/byte manipulation
* Various other incremental optimizations
## Miscellaneous changes ## Miscellaneous changes