1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/benchmark/mjit_exivar.yml
Takashi Kokubun dad110d068
Remove an unused pragma
It originally had a string literal, but it no longer has one.
2020-03-30 23:30:08 -07:00

31 lines
508 B
YAML

prelude: |
class Bench < Hash
def initialize
@exivar = nil
end
def exivar
@exivar
end
end
bench = Bench.new
if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
jit_min_calls = 10000
i = 0
while i < jit_min_calls
bench.exivar
i += 1
end
RubyVM::MJIT.pause # compile (1)
# issue recompile
bench.exivar
RubyVM::MJIT.resume
RubyVM::MJIT.pause # compile (2)
end
benchmark:
mjit_exivar: bench.exivar
loop_count: 200000000