Skip to content

Commit

Permalink
Add benchmark for recent optimization to avoid implicit allocations
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyevans committed Dec 7, 2023
1 parent 13cd963 commit f5a01b0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions benchmark/vm_method_splat_calls.yml
@@ -0,0 +1,13 @@
prelude: |
def f(x=0, y: 0) end
a = [1]
ea = []
kw = {y: 1}
b = lambda{}
benchmark:
arg_splat: "f(1, *ea)"
arg_splat_block: "f(1, *ea, &b)"
splat_kw_splat: "f(*a, **kw)"
splat_kw_splat_block: "f(*a, **kw, &b)"
splat_kw: "f(*a, y: 1)"
splat_kw_block: "f(*a, y: 1, &b)"

0 comments on commit f5a01b0

Please sign in to comment.