4 ms·
I don't have any benchmarks so I won't speculate which is faster, but both these options create a new function object. The fact that one is done implicitly does
by _greim_ 8y ago
I don't have any benchmarks so I won't speculate which is faster, but both these options create a new function object. The fact that one is done implicitly doesn't necessarily make it faster. I suspect performance will be highly engine- and version-specific, so best to choose the more idiomatic one (which I leave as an exercise for the reader to figure out).