Immediately-applied closures and local functions are at most a function call; they should never allocate a closure. In optimized builds, since they are generally single-use private functions, they should normally be inlined as well.
12 Likes