Member Function Pointers and the Fastest Possible C++ Delegates - CodeProject
And you are correct. std::function uses dynamic allocation internally to store the function pointer, since it cannot deduce at compile-time the size of the data needed. This gains in generality, and standards compliance, but loses in both memory footprint...