Skip to content

Commit

Permalink
Add NEWS entries about JIT in Jul ~ Dec
Browse files Browse the repository at this point in the history
* Instance variables
  * Merge ivar guards on JIT a69dd69 e4f7eee
  * Prefer RB_OBJ_FROZEN_RAW 5611066
  * Skip checking ROBJECT_EMBED 81a8d1c
* Method inlining
  * Mark some Integer methods as inline 0703e01
  * Allow inlining Integer#-@ and #~ dbb4f19
  * Inline builtin struct aref 167d139
  * Make Kernel#then, #yield_self, #frozen? builtin 24fa37d
  * (For future) Rewrite Kernel#tap with Ruby f3a0d7a
* Other optimizations
  * Inline constant references 53babf3
  * Lazily move PC with RUBY_VM_CHECK_INTS 5d74894
  * Cache access to reg_cfp->self on JIT d409837
* JIT compaction
  * Shrink the blocking region for compile_compact_jit_code ed8e552
  * Stop leaving .c files for JIT compaction in /tmp fa1250a
* GC of JIT-ed code
  * Run unload_units in the JIT worker thread 16dab6b
  * Avoid unloading units which have enough total_calls d80226e
  * Throttle unload_units 122cd35
  * Throttle JIT compaction 096f544
* Compilation speed
  * Eliminate IVC sync between JIT and Ruby threads 0960f56
  * Lazily move units from active_units to stale_units 5d8f227

Please see 200c5f4 for other improvements in Jan ~ Jun.
  • Loading branch information
k0kubun committed Dec 24, 2020
1 parent 8aa299d commit 176b757
Showing 1 changed file with 38 additions and 9 deletions.
47 changes: 38 additions & 9 deletions NEWS.md
Expand Up @@ -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
Expand Down

0 comments on commit 176b757

Please sign in to comment.