From e87d0882910001ef3b0c2ccd43bf00cee8c34a0c Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Fri, 13 Jan 2023 17:52:59 +0900 Subject: Change bytecode of `f(*a, **kw)` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `f(*a, **kw)` is compiled to `f([*a, kw])` but it makes an dummy array, so change it to pass two arguments `a` and `kw` with calling flags. ``` ruby 3.2.0 (2022-12-29 revision a7d467a792) [x86_64-linux] Calculating ------------------------------------- foo() 15.354M (± 4.2%) i/s - 77.295M in 5.043650s dele() 13.439M (± 3.9%) i/s - 67.109M in 5.001974s dele(*) 6.265M (± 4.5%) i/s - 31.730M in 5.075649s dele(*a) 6.286M (± 3.3%) i/s - 31.719M in 5.051516s dele(*a, **kw) 1.926M (± 4.5%) i/s - 9.753M in 5.076487s dele(*, **) 1.927M (± 4.2%) i/s - 9.710M in 5.048224s dele(...) 5.871M (± 3.9%) i/s - 29.471M in 5.028023s forwardable 4.969M (± 4.1%) i/s - 25.233M in 5.087498s ruby 3.3.0dev (2023-01-13T01:28:00Z master 7e8802fa5b) [x86_64-linux] Calculating ------------------------------------- foo() 16.354M (± 4.7%) i/s - 81.799M in 5.014561s dele() 14.256M (± 3.5%) i/s - 71.656M in 5.032883s dele(*) 6.701M (± 3.8%) i/s - 33.948M in 5.074938s dele(*a) 6.681M (± 3.3%) i/s - 33.578M in 5.031720s dele(*a, **kw) 4.200M (± 4.4%) i/s - 21.258M in 5.072583s dele(*, **) 4.197M (± 5.3%) i/s - 21.322M in 5.096684s dele(...) 6.039M (± 6.8%) i/s - 30.355M in 5.052662s forwardable 4.788M (± 3.2%) i/s - 24.033M in 5.024875s ``` --- gems/bundled_gems | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gems/bundled_gems') diff --git a/gems/bundled_gems b/gems/bundled_gems index 77ffc52ae0..35ef0a72e9 100644 --- a/gems/bundled_gems +++ b/gems/bundled_gems @@ -18,5 +18,5 @@ net-smtp 0.3.3 https://github.com/ruby/net-smtp matrix 0.4.2 https://github.com/ruby/matrix prime 0.1.2 https://github.com/ruby/prime rbs 3.0.2 https://github.com/ruby/rbs 7a5663f0f433ccd24db32e4dda9dc7754c269247 -typeprof 0.21.6 https://github.com/ruby/typeprof +typeprof 0.21.7 https://github.com/ruby/typeprof debug 1.7.1 https://github.com/ruby/debug 65197361213529fb5f0b5f6ec111b4d2688a3887 -- cgit v1.2.1