3 ms·
Who really uses debug builds in modern C++? They are just too slow to be usable.
by garaetjjte 4y ago
Who really uses debug builds in modern C++? They are just too slow to be usable.
- scatters 4y agoDebug doesn't have to mean unoptimized.
- usefulcat 4y agoA) I do B) plenty of “debug” checks can be enabled in a “release” build, e.g. just don’t define NDEBUG
- jcelerier 4y agoI do as far as is possible all of my development under my stdlib's debug mode with -fsanitize=address and -fsanitize=undefined. If it's slow like this on my 2018 workstation, it'll be slow in release mode on my users's 2011 dual core laptops and on raspberry pis. but if you need a bit more speed you can still build with -O2 -D_GLIBCXX_DEBUG=1 -D_GLIBCXX_DEBUG_PEDANTIC=1 # for libstdc++ -O2 -D_LIBCPP_DEBUG=1 # for libc++ /O2 /D_ITERATOR_DEBUG_LEVEL=1 # for msvc this way you get compiler optimizations but the assertions are still there
- CamperBob2 4y agoThey compile a lot faster.
- gumby 4y agoI do! How do you use a debugger otherwise?
- spacechild1 4y agoI always use debug builds while testing. They are of course much slower, but far from unusable - and I am mostly writing audio code
- pjmlp 4y agoPlenty of people, not everyone is doing AAA at 120 FPS.