ruby-changes:61944
From: Takashi <ko1@a...>
Date: Fri, 26 Jun 2020 17:34:32 +0900 (JST)
Subject: [ruby-changes:61944] 200c5f4075 (master): Add NEWS entries about JIT optimizations
https://git.ruby-lang.org/ruby.git/commit/?id=200c5f4075 From 200c5f4075cb1d179c2eba5b30b5b0a500870f67 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun <takashikkbn@g...> Date: Fri, 26 Jun 2020 00:54:05 -0700 Subject: Add NEWS entries about JIT optimizations and a related VM improvement. JIT related commits: * Code size reduction * Deduplicate functions on JIT compaction 818d6d33368a396d9cd3d1a34a84015a9e76c5c8 * Avoid always inlining cold paths of ivar fcd257629063a345c48ff2d8057fa8ab910881f2 * Inline only fast path of rb_class_of b16a2aa938d091c387a7437d94dac7f7bb829ba2 * Eliminate a call instruction on deopt 61b14bb32b7e62760225cb2207df5fe87e5339ab * Cold path partitioning * Mark method call slow paths as COLDFUNC 0e5a58b6bf6aae72b6290a8d68e0a1b6d9eb4f79 * Mark vm_stackoverflow as NOINLINE COLDFUNC 9d71373c237876038cbac63bb0132907a78288a2 * Create mjit_exec_slowpath and mark it as NOINLINE COLDFUNC 083a17a82ad4c1f80cfb9e84cfb1bff5586470b1 * Primitive.attr! 'inline' / Integer#zero? 7561db8c009bb79a75024fa4ed0350bfb3d0626c * Kernel#class 946e5cc668f66a4a0b79461047d3fcba8b71eef0 * (more to come...) * Properly generate opt_send for cfunc cc 7982dc1dfd5df000b7361ccb7bc820da4f3547b8 * Optimize exivar access b736ea63bd4ce4e2fc81dfa73938b39fa70f659c * Make JIT-ed leave leaf 151f8be40d385ada2ebf7feb84210ed7db7ef4df * Inline vm_call_cfunc b9d3ceee8f8e4fade1eddc0c18abee59f9c1eee7 VM: * Enable fastpath on invokesuper 5c2768181382bf84137759efea66f3aaf212665d * History: https://speakerdeck.com/k0kubun/ruby-3-samituto?slide=40 (in Japanese) diff --git a/NEWS.md b/NEWS.md index ac6c6de..fc80aa4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -235,6 +235,28 @@ Excluding feature bug fixes. https://github.com/ruby/ruby/blob/trunk/NEWS.md#L235 a keyword splat to a method that accepts specific keywords does not allocate a hash. +* `super` is optimized when the same type of method is called in the previous call, + when it's not refinements or an attr reader or writer. + +### JIT + +* Native functions shared by multiple methods are deduplicated on JIT compaction. + +* Decrease code size of hot paths by some optimizations and partitioning cold paths. + +* Not only pure Ruby methods but also some C methods skip pushing a method frame. + + * `Kernel#class`, `Integer#zero?` + +* Always generate appropriate code for `==`, `nil?`, and `!` calls depending on + a receiver class. + +* Optimize instance variable access in some core classes like Hash and their subclasses + +* Eliminate VM register access on a method return + +* Optimize C method call a little + ## Miscellaneous changes * Methods using `ruby2_keywords` will no longer keep empty keyword -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/