2 ms·
Hard to see how that is a real problem. For one std::function implementations usually do small obj optimization, so if all you are capturing is a pointer there
by zarkov99 8y ago
Hard to see how that is a real problem. For one std::function implementations usually do small obj optimization, so if all you are capturing is a pointer there is typically no allocation. Furthermore, this a setup cost, so typically only paid once, and it is a UI, so there is a human in the loop anyway, which enormously increases the performance tolerances.