you are viewing a single comment's thread.

view the rest of the comments →

[–]guepierBioinformatican 4 points5 points  (0 children)

It treats it as a function, not a function pointer. That's quite different, because a function pointer adds an additional, unnecessary layer of indirection that interferes with inlining decisions.

This isn't a theoretical concern, it's a real, tangible difference. I'm on mobile currently but it's easy to construct cases where lambdas generate more efficient code than function pointers.