1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Add a benchmark for JIT-ed code dispatch

This commit is contained in:
Takashi Kokubun 2019-09-21 16:09:45 +09:00
parent e006b992c2
commit b414999370
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

46
benchmark/mjit_exec.yml Normal file
View file

@ -0,0 +1,46 @@
prelude: |
# to be used with: --disable-gems --jit-min-calls=2
def compile(call)
eval(<<~EOS)
#{call}; #{call}
if RubyVM::MJIT.enabled?
RubyVM::MJIT.pause(wait: true)
end
EOS
end
benchmark:
- name: "mjit_exec_iseq_vme_jit "
prelude: |
def jit() end
compile('jit')
script: jit
- name: mjit_exec_iseq_vme_jit_jit
prelude: |
def jit2() end
def jit() jit2() end
compile('jit')
script: jit
- name: mjit_exec_iseq_vme_jit_vme
prelude: |
def jit2() rescue; end
def jit() jit2() end
compile('jit')
script: jit
- name: "mjit_exec_send_vme_jit "
prelude: |
def jit() end
compile('send(:jit)')
script: send(:jit)
- name: mjit_exec_send_vme_jit_jit
prelude: |
def jit2() end
def jit() send(:jit2) end
compile('send(:jit)')
script: send(:jit)
- name: mjit_exec_send_vme_jit_vme
prelude: |
def jit2() rescue; end
def jit() send(:jit2) end
compile('send(:jit)')
script: send(:jit)
loop_count: 30000000