3 ms·
In general, in template heavy libraries, what kills performance in debug builds is lack of inlining with optimizations turned off. And templates traditionally n
by hermitdev 5y ago
In general, in template heavy libraries, what kills performance in debug builds is lack of inlining with optimizations turned off. And templates traditionally need to be inlinable by having their full definition in a header, so one can't even say build with optimizations on with debug info in isolation, because it has to be done where the templates are used, not in the library where they're defined (because there is no separately built library for the template). In other words, it's a real pain to get just the templates optimized while the rest of your code is not optimized for easier debugging.