1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/tool
shyouhei d46ab95376 insns.def: refactor to avoid CALL_METHOD macro
These send and its variant instructions are the most frequently called
paths in the entire process.  Reducing macro expansions to make them
dedicated function called vm_sendish() is the main goal of this
changeset.  It reduces the size of vm_exec_coref from 25,552 bytes to
23,728 bytes on my machine.

I see no significant slowdown.

Fix: [GH-2056]

vanilla: ruby 2.6.0dev (2018-12-19 trunk 66449) [x86_64-darwin15]
ours: ruby 2.6.0dev (2018-12-19 refactor-send 66449) [x86_64-darwin15]
last_commit=insns.def: refactor to avoid CALL_METHOD macro
Calculating -------------------------------------
                         vanilla        ours
   vm2_defined_method     2.645M      2.823M i/s -      6.000M times in 5.109888s 4.783254s
           vm2_method     8.553M      8.873M i/s -      6.000M times in 1.579892s 1.524026s
   vm2_method_missing     3.772M      3.858M i/s -      6.000M times in 3.579482s 3.499220s
vm2_method_with_block     8.494M      8.944M i/s -      6.000M times in 1.589774s 1.509463s
      vm2_poly_method      0.571       0.607 i/s -       1.000 times in 3.947570s 3.733528s
   vm2_poly_method_ov      5.514       5.168 i/s -       1.000 times in 0.408156s 0.436169s
 vm3_clearmethodcache      2.875       2.837 i/s -       1.000 times in 0.783018s 0.793493s

Comparison:
                vm2_defined_method
                 ours:   2822555.4 i/s
              vanilla:   2644878.1 i/s - 1.07x  slower

                        vm2_method
                 ours:   8872947.8 i/s
              vanilla:   8553433.1 i/s - 1.04x  slower

                vm2_method_missing
                 ours:   3858192.3 i/s
              vanilla:   3772296.3 i/s - 1.02x  slower

             vm2_method_with_block
                 ours:   8943825.1 i/s
              vanilla:   8493955.0 i/s - 1.05x  slower

                   vm2_poly_method
                 ours:         0.6 i/s
              vanilla:         0.6 i/s - 1.06x  slower

                vm2_poly_method_ov
              vanilla:         5.5 i/s
                 ours:         5.2 i/s - 1.07x  slower

              vm3_clearmethodcache
              vanilla:         2.9 i/s
                 ours:         2.8 i/s - 1.01x  slower



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-26 00:59:37 +00:00
..
m4 _colorize_result_prepare.m4: do not save CONFIGURE_TTY 2018-11-19 07:00:12 +00:00
ruby_vm insns.def: refactor to avoid CALL_METHOD macro 2018-12-26 00:59:37 +00:00
test
asm_parse.rb
bisect.sh
build-transcode
change_maker.rb
checksum.rb
colorize.rb
darwin-cc darwin-cc: hide ld warnings 2018-09-21 07:19:13 +00:00
downloader.rb avoid passing unnecessary options to download method 2018-12-19 04:08:46 +00:00
enc-emoji-citrus-gen.rb
enc-emoji4unicode.rb
enc-unicode.rb Embed the Emoji version 2018-11-27 06:44:02 +00:00
eval.rb
expand-config.rb
extlibs.rb
fake.rb Add RbConfig.fire_update! 2018-11-14 04:42:14 +00:00
fetch-bundled_gems.rb
file2lastrev.rb
format-release Add a tool to update w.r-l.o files on release 2018-12-25 10:26:51 +00:00
gem-unpack.rb
gen_dummy_probes.rb
gen_ruby_tapset.rb
generate-backport-changelog.rb
generic_erb.rb
git-refresh
gperf.sed
id2token.rb
ifchange
insns2vm.rb
install-sh
jisx0208.rb
make-snapshot Set typeflag [Bug #15461] 2018-12-25 13:13:42 +00:00
make_hgraph.rb
mdoc2man.rb
merger.rb Keep RUBY_RELEASE_DATE's definition 2018-12-25 09:34:35 +00:00
mjit_archflag.sh mjit_archflag.sh: fix bare word in the header 2018-11-22 06:09:07 +00:00
mk_call_iseq_optimized.rb _mjit_compile_send.erb: refactor code to setup iseq 2018-09-24 06:09:55 +00:00
mkconfig.rb Remove unnecessary require of fileutils 2018-12-10 00:05:43 +00:00
mkrunnable.rb
node_name.rb tool/node_name.rb: rewrote without flip-flop 2018-09-07 13:43:01 +00:00
parse.rb
prereq.status
probes_to_wiki.rb
rbinstall.rb rbinstall.rb: purge %x[git ls-files] too 2018-12-20 04:03:07 +00:00
rbuninstall.rb
redmine-backporter.rb get rid of an encode noncompatible error 2018-08-13 12:42:55 +00:00
release.sh
rmdirs
run-gcov.rb
run-lcov.rb
runruby.rb
strip-rdoc.rb
sync_default_gems.rb Sync the executables of rdoc from upstream repository. 2018-11-26 12:23:45 +00:00
test-coverage.rb
transcode-tblgen.rb
transform_mjit_header.rb Fix a typo [ci skip] 2018-11-05 06:02:42 +00:00
update-deps update-deps: support coroutine dependencies 2018-12-03 13:12:34 +00:00
vcs.rb Limit uplevel travarsing 2018-12-10 01:58:28 +00:00
vpath.rb
vtlh.rb
ytab.sed Fix for bison 3.2 [Bug #15284] 2018-11-11 12:40:40 +00:00