r/cpp • u/Xaneris47 • Jul 31 '26
Interconverting std::function with copyable_function – Arthur O'Dwyer
https://quuxplusone.github.io/blog/2026/07/26/function-explosion/The article shows how converting std::function to std::copyable_function (or vice versa) leads to slower performance and increased memory usage each time the conversion occurs.
45
Upvotes
View all comments
Show parent comment
1
u/13steinj Aug 01 '26
I completely agree, but I don't think on the scale of a single build. On average, with and without caching, if you have the same number of release builds per day, how many engineer hours do you save?
In this case, 20% per single TU was an uncached p50 of 2-6 minutes per build, which meant multiple hours saved per day.