You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update Proc#call and block arguments vs yield for Ruby 2.5
In Ruby 2.5, passing through a `block` argument has become a lot faster.
I renamed the 'block argument' benchmark because I felt the old name was misleading as the fastest on Ruby 2.5.
Copy file name to clipboardExpand all lines: README.md
+45-15
Original file line number
Diff line number
Diff line change
@@ -963,29 +963,59 @@ Comparison:
963
963
964
964
##### `Proc#call` and block arguments vs `yield`[code](code/proc-and-block/proc-call-vs-yield.rb)
965
965
966
-
In MRI Ruby, block arguments [are converted to Procs](https://www.omniref.com/ruby/2.2.0/symbols/Proc/yield?#annotation=4087638&line=711), which incurs a heap allocation.
966
+
In MRI Ruby before 2.5, block arguments [are converted to Procs](https://www.omniref.com/ruby/2.2.0/symbols/Proc/yield?#annotation=4087638&line=711), which incurs a heap allocation.
0 commit comments