4 ms·
There was a post on a Reddit discussion of this that was quite interesting: http://www.reddit.com/r/ruby/comments/2x9axs/why_blocks_make_ruby_methods_439_slower
by bilalq 12y ago
There was a post on a Reddit discussion of this that was quite interesting:
http://www.reddit.com/r/ruby/comments/2x9axs/why_blocks_make_ruby_methods_439_slower/coy5gcb http://www.reddit.com/r/ruby/comments/2x9axs/why_blocks_make...
Apparently, this is due to overhead from creating a Proc object. The performance is better with blocks in JRuby, and the same will apply to MRI 2.3 when that gets released.