summaryrefslogtreecommitdiff
path: root/benchmark/mjit_exec.yml
blob: d2621888f23da4dc1b4b194171755b9f6836b2b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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