In fact, according to one very interesting reading , the second option is 439% slower ( linked thread on HackerNews).
TL DR: Creating and transferring a block using yield is a very optimized general case in MRI, which is handled by a special C function in the interpreter, and the transfer of &block is done differently and has a lot of overhead for creating a new environment and creating Proc for each call.
To summarize, use &block only if you need to pass it further (for example, to the next function) or somehow change it. Otherwise, use yield as it is faster.
source share