4 ms·
But passing two blocks/lambdas/etc doesn't inherently need to be that difficult it's not in other languages. I don't know that much about Ruby's implementation
by rat87 4y ago
But passing two blocks/lambdas/etc doesn't inherently need to be that difficult it's not in other languages.
I don't know that much about Ruby's implementation but I think both the if else and blocks not being objects are that way to prevent Ruby from being even slower. My understanding is if you turn a block into a proc it gets a lot slower.