1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/tool/ruby_vm/views
Takashi Kokubun 78352fb52e
Compile opt_send for opt_* only when cc has ISeq
because opt_nil/opt_not/opt_eq populates cc even when it doesn't
fallback to opt_send_without_block because of vm_method_cfunc_is.

```
$ benchmark-driver -v --rbenv 'before --jit;after --jit' benchmark/mjit_opt_cc_insns.yml --repeat-count=4
before --jit: ruby 2.8.0dev (2020-06-22T08:11:24Z master d231b8f95b) +JIT [x86_64-linux]
after --jit: ruby 2.8.0dev (2020-06-22T08:53:27Z master e1125879ed) +JIT [x86_64-linux]
last_commit=Compile opt_send for opt_* only when cc has ISeq
Calculating -------------------------------------
                     before --jit  after --jit
        mjit_nil?(1)      54.106M      73.693M i/s -     40.000M times in 0.739288s 0.542795s
         mjit_not(1)      53.398M      74.477M i/s -     40.000M times in 0.749090s 0.537075s
     mjit_eq(1, nil)       7.427M       6.497M i/s -      8.000M times in 1.077136s 1.231326s

Comparison:
                     mjit_nil?(1)
         after --jit:  73692594.3 i/s
        before --jit:  54106108.4 i/s - 1.36x  slower

                      mjit_not(1)
         after --jit:  74477487.9 i/s
        before --jit:  53398125.0 i/s - 1.39x  slower

                  mjit_eq(1, nil)
        before --jit:   7427105.9 i/s
         after --jit:   6497063.0 i/s - 1.14x  slower
```

Actually opt_eq becomes slower by this. Maybe it's indeed using
opt_send_without_block, but I'll approach that one in another commit.
2020-06-22 02:08:21 -07:00
..
_attributes.erb
_c_expr.erb
_comptime_insn_stack_increase.erb
_copyright.erb
_insn_entry.erb Verify builtin inline annotation with VM_CHECK_MODE (#3244) 2020-06-21 10:27:04 -07:00
_insn_len_info.erb
_insn_name_info.erb
_insn_operand_info.erb
_insn_sp_pc_dependency.erb
_insn_type_chars.erb
_leaf_helpers.erb
_mjit_compile_insn.erb Delay definition of pc_moved_p 2020-04-06 01:55:18 -07:00
_mjit_compile_insn_body.erb Make sure newarraykwsplat accesses a correct index 2020-04-18 01:41:50 -07:00
_mjit_compile_ivar.erb Optimize exivar access on JIT-ed getivar 2020-03-30 23:16:35 -07:00
_mjit_compile_pc_and_sp.erb Delay definition of pc_moved_p 2020-04-06 01:55:18 -07:00
_mjit_compile_send.erb Compile opt_send for opt_* only when cc has ISeq 2020-06-22 02:08:21 -07:00
_notice.erb
_sp_inc_helpers.erb VALUE size packed callinfo (ci). 2020-02-22 09:58:59 +09:00
_trace_instruction.erb
insns.inc.erb
insns_info.inc.erb
mjit_compile.inc.erb Compile opt_send for opt_* only when cc has ISeq 2020-06-22 02:08:21 -07:00
opt_sc.inc.erb
optinsn.inc.erb
optunifs.inc.erb
vm.inc.erb
vmtc.inc.erb