1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/tool
Takashi Kokubun 37a2e48d76
Avoid generating opt_send with cfunc cc with JIT
only for opt_nil_p and opt_not.

While vm_method_cfunc_is is used for opt_eq too, many fast paths of it
don't call it. So if it's populated, it should generate opt_send,
regardless of cfunc or not. And again, opt_neq isn't relevant due to the
difference in operands.
So opt_nil_p and opt_not are the only variants using vm_method_cfunc_is
like they use.

```
$ benchmark-driver -v --rbenv 'before2 --jit::ruby --jit;before --jit;after --jit' benchmark/mjit_opt_cc_insns.yml --repeat-count=4
before2 --jit: ruby 2.8.0dev (2020-06-22T08:37:37Z master 3238641750) +JIT [x86_64-linux]
before --jit: ruby 2.8.0dev (2020-06-23T01:01:24Z master 9ce2066209) +JIT [x86_64-linux]
after --jit: ruby 2.8.0dev (2020-06-23T06:58:37Z master 17e9df3157) +JIT [x86_64-linux]
last_commit=Avoid generating opt_send with cfunc cc with JIT
Calculating -------------------------------------
                     before2 --jit  before --jit  after --jit
        mjit_nil?(1)       54.204M       75.536M      75.031M i/s -     40.000M times in 0.737947s 0.529548s 0.533110s
         mjit_not(1)       53.822M       70.921M      71.920M i/s -     40.000M times in 0.743195s 0.564007s 0.556171s
     mjit_eq(1, nil)        7.367M        6.496M       7.331M i/s -      8.000M times in 1.085882s 1.231470s 1.091327s

Comparison:
                     mjit_nil?(1)
        before --jit:  75536059.3 i/s
         after --jit:  75031409.4 i/s - 1.01x  slower
       before2 --jit:  54204431.6 i/s - 1.39x  slower

                      mjit_not(1)
         after --jit:  71920324.1 i/s
        before --jit:  70921063.1 i/s - 1.01x  slower
       before2 --jit:  53821697.6 i/s - 1.34x  slower

                  mjit_eq(1, nil)
       before2 --jit:   7367280.0 i/s
         after --jit:   7330527.4 i/s - 1.01x  slower
        before --jit:   6496302.8 i/s - 1.13x  slower
```
2020-06-23 00:09:54 -07:00
..
bundler [rubygems/rubygems] Test against compact_index 0.13.0 2020-06-05 07:32:42 +09:00
lib Prefer String#each_byte when using a block 2020-06-15 16:20:56 +09:00
m4
ruby_vm Avoid generating opt_send with cfunc cc with JIT 2020-06-23 00:09:54 -07:00
test
actions-commit-info.sh
asm_parse.rb
bisect.sh
build-transcode
checksum.rb
colors
darwin-cc
downloader.rb
enc-emoji-citrus-gen.rb
enc-emoji4unicode.rb
enc-unicode.rb
eval.rb
expand-config.rb
extlibs.rb fiddle: need to update configure after updating config tools 2020-05-27 00:30:59 +09:00
fake.rb
fetch-bundled_gems.rb
file2lastrev.rb
format-release
gem-unpack.rb
gen-mailmap.rb
gen_dummy_probes.rb
gen_ruby_tapset.rb
generic_erb.rb
git-refresh
gperf.sed
id2token.rb
ifchange
insns2vm.rb
install-sh
leaked-globals Update leaked-globals [Bug #16934] 2020-06-04 17:00:52 +09:00
make-snapshot
make_hgraph.rb
mdoc2man.rb
merger.rb
mjit_archflag.sh
mjit_tabs.rb
mk_builtin_loader.rb Introduce Primitive.attr! to annotate 'inline' (#3242) 2020-06-20 17:13:03 -07:00
mkconfig.rb
mkrunnable.rb runnable.rb: ignore broken symlink error on Windows [ci skip] 2020-05-30 01:15:23 +09:00
node_name.rb
parse.rb
prereq.status
probes_to_wiki.rb
pure_parser.rb pure_parser.rb: get rid of an error at localed messages 2020-05-20 10:52:32 +09:00
rbinstall.rb Added install-dbg 2020-06-13 08:22:06 +09:00
rbuninstall.rb
redmine-backporter.rb
release.sh
rmdirs
run-gcov.rb
run-lcov.rb
runruby.rb Prefer ruby_install_name as runner 2020-06-21 10:34:07 +09:00
strip-rdoc.rb
sync_default_gems.rb Removed sdbm entries from toolchanins 2020-06-19 08:26:47 +09:00
test-bundled-gems.rb
test-coverage.rb Use Module#name instead of #inspect 2020-05-28 14:39:53 +09:00
transcode-tblgen.rb
transform_mjit_header.rb Mark some JIT-ed functions as COLDFUNC 2020-05-17 22:21:31 -07:00
travis_retry.sh
update-deps
vtlh.rb
ytab.sed