mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
![]() _mjit_compile_send_guard.erb: carve out the shared logic to invalidate inlined method call common.mk: update dependency for this change test_jit.rb: add test for attr_reader optimization * Benchmark ``` require 'benchmark_driver' Benchmark.driver do |x| x.prelude %{ class C attr_reader :a def initialize @a = 1 end end o = C.new def l o i = 0 while i < 1000000 o.a i += 1 end end } x.report 'aread', %{ l o } x.loop_count 1000 x.rbenv 'before', 'before,--jit', 'after,--jit' x.verbose end ``` ``` before: ruby 2.6.0dev (2018-04-20 trunk 63211) [x86_64-linux] before,--jit: ruby 2.6.0dev (2018-04-20 trunk 63211) +JIT [x86_64-linux] after,--jit: ruby 2.6.0dev (2018-04-20 trunk 63211) +JIT [x86_64-linux] last_commit=_mjit_compile_send.erb: inline attr_reader call Calculating ------------------------------------- before before,--jit after,--jit aread 54.597 122.894 218.574 i/s - 1.000k times in 18.316102s 8.137089s 4.575106s Comparison: aread after,--jit: 218.6 i/s before,--jit: 122.9 i/s - 1.78x slower before: 54.6 i/s - 4.00x slower ``` * Optcarrot A little made faster? fps: 71.35 -> 72.11 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
||
---|---|---|
.. | ||
_attributes.erb | ||
_c_expr.erb | ||
_copyright.erb | ||
_insn_entry.erb | ||
_insn_len_info.erb | ||
_insn_name_info.erb | ||
_insn_operand_info.erb | ||
_insn_stack_increase.erb | ||
_insn_type_chars.erb | ||
_mjit_compile_insn.erb | ||
_mjit_compile_insn_body.erb | ||
_mjit_compile_pc_and_sp.erb | ||
_mjit_compile_send.erb | ||
_mjit_compile_send_guard.erb | ||
_notice.erb | ||
_trace_instruction.erb | ||
insns.inc.erb | ||
insns_info.inc.erb | ||
mjit_compile.inc.erb | ||
opt_sc.inc.erb | ||
optinsn.inc.erb | ||
optunifs.inc.erb | ||
vm.inc.erb | ||
vmtc.inc.erb |