[前][次][番号順一覧][スレッド一覧]

ruby-changes:57853

From: Takashi <ko1@a...>
Date: Sat, 21 Sep 2019 16:11:02 +0900 (JST)
Subject: [ruby-changes:57853] b414999370 (master): Add a benchmark for JIT-ed code dispatch

https://git.ruby-lang.org/ruby.git/commit/?id=b414999370

From b4149993709169b9a67373095593da385e7d48e5 Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Sat, 21 Sep 2019 16:09:45 +0900
Subject: Add a benchmark for JIT-ed code dispatch


diff --git a/benchmark/mjit_exec.yml b/benchmark/mjit_exec.yml
new file mode 100644
index 0000000..d262188
--- /dev/null
+++ b/benchmark/mjit_exec.yml
@@ -0,0 +1,46 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/mjit_exec.yml#L1
+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
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]