diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2020-12-23 22:59:57 -0800 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2020-12-23 23:02:18 -0800 |
commit | 176b75747c3a079cab5cc83c47d54fa4f9dfa6be (patch) | |
tree | 63183351f817d1af3bd6d5758478aba1225f378d /NEWS.md | |
parent | 8aa299de24145891848ce50e29856d2275c75fd3 (diff) |
Add NEWS entries about JIT in Jul ~ Dec
* Instance variables
* Merge ivar guards on JIT https://github.com/ruby/ruby/commit/a69dd699ee630dd1086627dbca15a218a8538b6f https://github.com/ruby/ruby/commit/e4f7eee009ebe1f23ee3e5ea69ccd9ea1530bc6f
* Prefer RB_OBJ_FROZEN_RAW https://github.com/ruby/ruby/commit/5611066e03fe73bdbb08cc46f79530c69975cf17
* Skip checking ROBJECT_EMBED https://github.com/ruby/ruby/commit/81a8d1cf09d59f0d69143d7896545f849f580a4e
* Method inlining
* Mark some Integer methods as inline https://github.com/ruby/ruby/commit/0703e014713ae92f4c8a2b31e385718dc2452eac
* Allow inlining Integer#-@ and #~ https://github.com/ruby/ruby/commit/dbb4f1996939d0ce977e6b37579e28dd886428ff
* Inline builtin struct aref https://github.com/ruby/ruby/commit/167d139487d67613bd02522e24476f06ffa137b7
* Make Kernel#then, #yield_self, #frozen? builtin https://github.com/ruby/ruby/commit/24fa37d87a24dc932c1d778bcaf91204f5c12a76
* (For future) Rewrite Kernel#tap with Ruby https://github.com/ruby/ruby/commit/f3a0d7a2035e9f5e0c70effd55732607e3def263
* Other optimizations
* Inline constant references https://github.com/ruby/ruby/commit/53babf35ef5b643774636550ea23851e2607e076
* Lazily move PC with RUBY_VM_CHECK_INTS https://github.com/ruby/ruby/commit/5d74894f2bc4a3a18aec952d946ead3d784cb4b4
* Cache access to reg_cfp->self on JIT https://github.com/ruby/ruby/commit/d40983772966938828a28c6e89752a3e76447b9e
* JIT compaction
* Shrink the blocking region for compile_compact_jit_code https://github.com/ruby/ruby/commit/ed8e552d4d2c825a3f780ac8bd898eaaca7c21e7
* Stop leaving .c files for JIT compaction in /tmp https://github.com/ruby/ruby/commit/fa1250a506e9b6a1bcbf664f6b7b9c06e045d9b9
* GC of JIT-ed code
* Run unload_units in the JIT worker thread https://github.com/ruby/ruby/commit/16dab6b69263ed9c816bc0283c8c1f2f95dc1027
* Avoid unloading units which have enough total_calls https://github.com/ruby/ruby/commit/d80226e7bd801fcbccf71f19ba373b7baf71a49e
* Throttle unload_units https://github.com/ruby/ruby/commit/122cd35939ddf8ef7bfa17ad75570c01d0cf06ab
* Throttle JIT compaction https://github.com/ruby/ruby/commit/096f54428d8000cccce430022784cb0e7cd31cb4
* Compilation speed
* Eliminate IVC sync between JIT and Ruby threads https://github.com/ruby/ruby/commit/0960f56a1d773c5417e9de729e159d346aec17ca
* Lazily move units from active_units to stale_units https://github.com/ruby/ruby/commit/5d8f227d0edd3c542fcac465eb82005a5f852d34
Please see https://github.com/ruby/ruby/commit/200c5f4075cb1d179c2eba5b30b5b0a500870f67 for other improvements in Jan ~ Jun.
Diffstat (limited to 'NEWS.md')
-rw-r--r-- | NEWS.md | 47 |
1 files changed, 38 insertions, 9 deletions
@@ -630,22 +630,51 @@ Excluding feature bug fixes. ### JIT -* Native functions shared by multiple methods are deduplicated on JIT compaction. +* Performance improvements of JIT-ed code -* Decrease code size of hot paths by some optimizations and partitioning cold paths. + * Microarchitectural optimizations -* Not only pure Ruby methods but also some C methods skip pushing a method frame. + * Native functions shared by multiple methods are deduplicated on JIT compaction. - * `Kernel#class`, `Integer#zero?` + * Decrease code size of hot paths by some optimizations and partitioning cold paths. -* Always generate appropriate code for `==`, `nil?`, and `!` calls depending on - a receiver class. + * Instance variables -* Optimize instance variable access in some core classes like Hash and their subclasses. + * Eliminate some redundant checks. -* Eliminate VM register access on a method return. + * Skip checking a class and a object multiple times in a method when possible. -* Optimize C method calls a little. + * Optimize accesses in some core classes like Hash and their subclasses. + + * Method inlining support for some C methods + + * `Kernel`: `#class`, `#frozen?` + + * `Integer`: `#-@`, `#~`, `#abs`, `#bit_length`, `#even?`, `#integer?`, `#magnitude`, + `#odd?`, `#ord`, `#to_i`, `#to_int`, `#zero?` + + * `Struct`: reader methods for 10th or later members + + * Constant references are inlined. + + * Always generate appropriate code for `==`, `nil?`, and `!` calls depending on + a receiver class. + + * Reduce the number of VM register accesses on branches and method returns. + + * Optimize C method calls a little. + +* Compilation process improvements + + * It does not keep temporary files in /tmp anymore. + + * Throttle GC and compaction of JIT-ed code. + + * Avoid GC-ing JIT-ed code when not necessary. + + * GC-ing JIT-ed code is executed in a background thread. + + * Reduce the number of locks between Ruby and JIT threads. ## Static analysis |