From 41e3c204fd83660a243fa61f91aeda2a78817a97 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Thu, 26 Sep 2019 22:13:24 +0900 Subject: Reduce ISeq size of mjit_exec benchmark to avoid unwanted memory pressure --- benchmark/lib/benchmark_driver/runner/mjit_exec.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'benchmark/lib') 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 -- cgit v1.2.3