ruby-changes:57934
From: Takashi <ko1@a...>
Date: Thu, 26 Sep 2019 22:13:53 +0900 (JST)
Subject: [ruby-changes:57934] 41e3c204fd (master): Reduce ISeq size of mjit_exec benchmark
https://git.ruby-lang.org/ruby.git/commit/?id=41e3c204fd From 41e3c204fd83660a243fa61f91aeda2a78817a97 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun <takashikkbn@g...> Date: Thu, 26 Sep 2019 22:13:24 +0900 Subject: Reduce ISeq size of mjit_exec benchmark to avoid unwanted memory pressure diff --git a/benchmark/lib/benchmark_driver/runner/mjit_exec.rb b/benchmark/lib/benchmark_driver/runner/mjit_exec.rb index 7477fa1..9f7c8c8 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 https://github.com/ruby/ruby/blob/trunk/benchmark/lib/benchmark_driver/runner/mjit_exec.rb#L140 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 https://github.com/ruby/ruby/blob/trunk/benchmark/lib/benchmark_driver/runner/mjit_exec.rb#L177 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 https://github.com/ruby/ruby/blob/trunk/benchmark/lib/benchmark_driver/runner/mjit_exec.rb#L214 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 78c31b3..5be408e 100644 --- a/benchmark/mjit_exec_jt2jt.yml +++ b/benchmark/mjit_exec_jt2jt.yml @@ -2,10 +2,7 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/mjit_exec_jt2jt.yml#L2 # 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 165677e..9947dbb 100644 --- a/benchmark/mjit_exec_vm2jt.yml +++ b/benchmark/mjit_exec_vm2jt.yml @@ -2,9 +2,7 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/mjit_exec_vm2jt.yml#L2 # 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 3f9274d..4b84427 100644 --- a/benchmark/mjit_exec_vm2vm.yml +++ b/benchmark/mjit_exec_vm2vm.yml @@ -2,9 +2,7 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/mjit_exec_vm2vm.yml#L2 # 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/