aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2019-09-26 22:13:24 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2019-09-26 22:13:31 +0900
commit41e3c204fd83660a243fa61f91aeda2a78817a97 (patch)
treecef6a18e1f11396ffc0097a17e3333a21145bae4 /benchmark
parent1070456bb8ddf48be7b601daa024fe372c3c25c1 (diff)
downloadruby-41e3c204fd83660a243fa61f91aeda2a78817a97.tar.gz
Reduce ISeq size of mjit_exec benchmark
to avoid unwanted memory pressure
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/lib/benchmark_driver/runner/mjit_exec.rb18
-rw-r--r--benchmark/mjit_exec_jt2jt.yml7
-rw-r--r--benchmark/mjit_exec_vm2jt.yml6
-rw-r--r--benchmark/mjit_exec_vm2vm.yml6
4 files changed, 15 insertions, 22 deletions
diff --git a/benchmark/lib/benchmark_driver/runner/mjit_exec.rb b/benchmark/lib/benchmark_driver/runner/mjit_exec.rb
index 7477fa1830..9f7c8c8af3 100644
--- a/benchmark/lib/benchmark_driver/runner/mjit_exec.rb
+++ b/benchmark/lib/benchmark_driver/runner/mjit_exec.rb
@@ -140,13 +140,13 @@ class BenchmarkDriver::Runner::MjitExec
def vm
t = Process.clock_gettime(Process::CLOCK_MONOTONIC)
i = 0
- while i < 10000
- % (loop_count / 10000).times do |i|
+ while i < <%= loop_count / 1000 %>
+ % 1000.times do |i|
a<%= i % num_methods %>
% end
i += 1
end
- % (loop_count % 10000).times do |i|
+ % (loop_count % 1000).times do |i|
a<%= i % num_methods %>
% end
Process.clock_gettime(Process::CLOCK_MONOTONIC) - t
@@ -177,13 +177,13 @@ class BenchmarkDriver::Runner::MjitExec
def vm
t = Process.clock_gettime(Process::CLOCK_MONOTONIC)
i = 0
- while i < 10000
- % (loop_count / 10000).times do |i|
+ while i < <%= loop_count / 1000 %>
+ % 1000.times do |i|
a<%= i % num_methods %>
% end
i += 1
end
- % (loop_count % 10000).times do |i|
+ % (loop_count % 1000).times do |i|
a<%= i % num_methods %>
% end
Process.clock_gettime(Process::CLOCK_MONOTONIC) - t
@@ -214,13 +214,13 @@ class BenchmarkDriver::Runner::MjitExec
def jit
t = Process.clock_gettime(Process::CLOCK_MONOTONIC)
i = 0
- while i < 10000
- % (loop_count / 10000).times do |i|
+ while i < <%= loop_count / 1000 %>
+ % 1000.times do |i|
a<%= i % num_methods %>
% end
i += 1
end
- % (loop_count % 10000).times do |i|
+ % (loop_count % 1000).times do |i|
a<%= i % num_methods %>
% end
Process.clock_gettime(Process::CLOCK_MONOTONIC) - t
diff --git a/benchmark/mjit_exec_jt2jt.yml b/benchmark/mjit_exec_jt2jt.yml
index 78c31b3ca8..5be408e30c 100644
--- a/benchmark/mjit_exec_jt2jt.yml
+++ b/benchmark/mjit_exec_jt2jt.yml
@@ -2,10 +2,7 @@
# RUBYOPT=-Ibenchmark/lib benchmark-driver -e 'ruby --jit' benchmark/mjit_exec_vm2jt.yml
type: mjit_exec # benchmark/lib/benchmark_driver/runner/mjit_exec.rb
num_methods: [1]
-#num_methods: [1, 10, 20, 30, 40, 50, 100, 200, 500, 1000]
-#num_methods: [1, 1000]
-#num_methods: (1..100)
-#num_methods: (1..10).map { |i| i * 10 }
-loop_count: 10000000
+#num_methods: (1..100).to_a + [200, 300, 400, 500, 600, 700, 800, 900, 1000]
+loop_count: 50000000
from_jit: true
to_jit: true
diff --git a/benchmark/mjit_exec_vm2jt.yml b/benchmark/mjit_exec_vm2jt.yml
index 165677e249..9947dbb7dd 100644
--- a/benchmark/mjit_exec_vm2jt.yml
+++ b/benchmark/mjit_exec_vm2jt.yml
@@ -2,9 +2,7 @@
# RUBYOPT=-Ibenchmark/lib benchmark-driver -e 'ruby --jit' benchmark/mjit_exec_vm2jt.yml
type: mjit_exec # benchmark/lib/benchmark_driver/runner/mjit_exec.rb
num_methods: [1]
-#num_methods: [1, 10, 20, 30, 40, 50, 100, 200, 500, 1000]
-#num_methods: (1..100)
-#num_methods: (1..10).map { |i| i * 10 }
-loop_count: 10000000
+#num_methods: (1..100).to_a + [200, 300, 400, 500, 600, 700, 800, 900, 1000]
+loop_count: 50000000
from_jit: false
to_jit: true
diff --git a/benchmark/mjit_exec_vm2vm.yml b/benchmark/mjit_exec_vm2vm.yml
index 3f9274d8bd..4b84427b10 100644
--- a/benchmark/mjit_exec_vm2vm.yml
+++ b/benchmark/mjit_exec_vm2vm.yml
@@ -2,9 +2,7 @@
# RUBYOPT=-Ibenchmark/lib benchmark-driver -e 'ruby --jit' benchmark/mjit_exec_vm2vm.yml
type: mjit_exec # benchmark/lib/benchmark_driver/runner/mjit_exec.rb
num_methods: [1]
-#num_methods: [1, 10, 20, 30, 40, 50, 100, 200, 500, 1000]
-#num_methods: (1..100)
-#num_methods: (1..10).map { |i| i * 10 }
-loop_count: 10000000
+#num_methods: (1..100).to_a + [200, 300, 400, 500, 600, 700, 800, 900, 1000]
+loop_count: 50000000
from_jit: false
to_jit: false