mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Reduce ISeq size of mjit_exec benchmark
to avoid unwanted memory pressure
This commit is contained in:
parent
1070456bb8
commit
41e3c204fd
4 changed files with 15 additions and 22 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue