ruby/benchmark/vm_super_splat_calls.yml

26 строки
1018 B
YAML

prelude: |
@a = [1].freeze
@ea = [].freeze
@kw = {y: 1}.freeze
@b = lambda{}
extend(Module.new{def arg_splat(x=0, y: 0) end})
extend(Module.new{def arg_splat_block(x=0, y: 0) end})
extend(Module.new{def splat_kw_splat(x=0, y: 0) end})
extend(Module.new{def splat_kw_splat_block(x=0, y: 0) end})
extend(Module.new{def splat_kw(x=0, y: 0) end})
extend(Module.new{def splat_kw_block(x=0, y: 0) end})
extend(Module.new{def arg_splat; super(1, *@ea) end})
extend(Module.new{def arg_splat_block; super(1, *@ea, &@b) end})
extend(Module.new{def splat_kw_splat; super(*@a, **@kw) end})
extend(Module.new{def splat_kw_splat_block; super(*@a, **@kw, &@b) end})
extend(Module.new{def splat_kw; super(*@a, y: 1) end})
extend(Module.new{def splat_kw_block; super(*@a, y: 1, &@b) end})
benchmark:
arg_splat: "arg_splat"
arg_splat_block: "arg_splat_block"
splat_kw_splat: "splat_kw_splat"
splat_kw_splat_block: "splat_kw_splat_block"
splat_kw: "splat_kw"
splat_kw_block: "splat_kw_block"