3 ms·
I feel like that's mostly Microsoft's fault, their STL implementation is super aggressive about checks in debug builds to the point that it becomes sort of usel
by CoolGuySteve 7y ago
I feel like that's mostly Microsoft's fault, their STL implementation is super aggressive about checks in debug builds to the point that it becomes sort of useless in heavy use/high performance scenarios. Between that and the lack of valgrind, I'm pretty glad I left that world.
Over in Linux/g++ land, it's not nearly so bad. Bounds errors are mostly handled by address sanitizer such that -O0 performance is decent. And if -O0 is too slow, there's -Og which takes slightly longer to compile and has less information for gdb.
I work almost exclusively in "g++ -O0" until it's time to release.
Clang is decent too, but I find the C++ compile times are atrocious, like almost double for my admittedly template-heavy code. And performance of the compiled output is no better.
- makapuf 7y agoDoesn't gcc have -Og that enables some optimizations but leaves the ones that prevent debugging.
- CoolGuySteve 7y agoIt has issues sometimes evaluating inlined expressions, unfortunately.
- PirateAvogadro 7y agoYou could use ITERATOR_DEBUG_LEVEL=1 or 0 in debug mode; I made a "FastDebug" profile for this, although you will have to recompile dependencies