mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 05:29:10 +02:00

These show gains from the recent optimization commits: ``` arg_splat miniruby: 7346039.9 i/s miniruby-before: 4692240.8 i/s - 1.57x slower arg_splat_block miniruby: 6539749.6 i/s miniruby-before: 4358063.6 i/s - 1.50x slower splat_kw_splat miniruby: 5433641.5 i/s miniruby-before: 3851048.6 i/s - 1.41x slower splat_kw_splat_block miniruby: 4916137.1 i/s miniruby-before: 3477090.1 i/s - 1.41x slower splat_kw_block miniruby: 2912829.5 i/s miniruby-before: 2465611.7 i/s - 1.18x slower arg_splat_post miniruby: 2195208.2 i/s miniruby-before: 1860204.3 i/s - 1.18x slower ``` zsuper only speeds up in the post argument case, because it was already set to use splatarray false in cases where there were no post arguments.
25 lines
1,018 B
YAML
25 lines
1,018 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"
|