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 b16a2aa938
Reduce code size for rb_class_of
by inlining only hot path.

=== mame/optcarrot ===

$ benchmark-driver -v --rbenv 'before --jit;after --jit' benchmark.yml --repeat-count=24 --output=all
before --jit: ruby 2.8.0dev (2020-05-18T05:21:31Z master 0e5a58b6bf) +JIT [x86_64-linux]
after --jit: ruby 2.8.0dev (2020-05-18T06:12:04Z master 0e3d71a8d1) +JIT [x86_64-linux]
last_commit=Reduce code size for rb_class_of
Calculating -------------------------------------
                                 before --jit           after --jit
Optcarrot Lan_Master.nes    71.62880463568773     70.95730063273503 fps
                            71.73973684273152     71.98447841929851
                            75.03923801841310     75.54262519509039
                            75.16300287174957     77.64029272984344
                            75.16834828625935     78.67861469580785
                            75.17670723726911     78.81879353707393
                            75.67637908020630     79.18188850392886
                            76.19843953215396     79.66484891814478
                            77.28166716118808     79.80278072861037
                            77.38509903325165     80.05859292679696
                            78.12693418455953     80.34624804808006
                            78.73654441746730     80.66326571254345
                            79.25387513454415     80.69760605740196
                            79.44137881689524     81.32053489212245
                            79.50497657368358     81.50250852553751
                            79.62401328582868     82.27544931834611
                            79.79178811723664     82.67455264522741
                            81.20275352937418     82.93857260493297
                            81.57027048640776     83.15019118788184
                            81.63373188649095     83.20728816044721
                            81.93420437766426     83.25027576772972
                            82.05716136357167     83.27072145898173
                            82.21070805525066     83.36008265822194
                            82.56924063784872     83.36112268888493

=== benchmark-driver/sinatra ===

[rps]
before: 13143.49 rps
after: 13505.70 rps

[inlined rb_class_of size]
before: 11.5K
after: 3.8K

(calculated by `dwarftree --die inlined_subroutine --flat --merge --show-size`)
2020-05-17 23:38:19 -07:00
..
_attributes.erb
_c_expr.erb
_comptime_insn_stack_increase.erb
_copyright.erb
_insn_entry.erb
_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 Reduce code size for rb_class_of 2020-05-17 23:38:19 -07:00
_notice.erb
_sp_inc_helpers.erb
_trace_instruction.erb
insns.inc.erb
insns_info.inc.erb
mjit_compile.inc.erb Always correct sp on leave cancel 2020-05-06 20:26:03 -07:00
opt_sc.inc.erb
optinsn.inc.erb
optunifs.inc.erb
vm.inc.erb
vmtc.inc.erb