Open AlexGuteniev opened 4 months ago
We talked about this at the weekly maintainer meeting and @barcharcraz had a suggestion - build as Release
, but then add compiler options (e.g. /Zi
) to generate debug info.
Charlie was additionally concerned that we shouldn't be trying to force the build type here - it would be better to provide a default that can be overridden when building the benchmarks, if a contributor temporarily wants something different. We don't immediately know the proper incantations for that.
Noticed while working #4495 . When I decided to use sized
if constexpr
dispatch, instead of using the same version for all element sizes, I observed significant perf degradation for small element sizes. A part of it is due to not inlining the dispatcher.The benchmark is built with
/Ob1
. Looks like it is implied due to CMakeRelWithDebugInfo
configuration, as opposed toRelease
.What are our takeaways?
I see the following options:
inline
, consider making other STL functionsinline
.RelWithDebugInfo
to inline STL, though it would obfuscate the debuggerRelease
by default, instead ofRelWithDebugInfo
RelWithDebugInfo
is convenient for profilingif constexpr
__std_reverse_copy_trivially_copyable...