3 ms·
It sometimes pays to run your tests at different levels of optimization. There are optimizer and code generation bugs in compilers. Running your tests at diff
by stcredzero 16y ago
It sometimes pays to run your tests at different levels of optimization. There are optimizer and code generation bugs in compilers. Running your tests at different levels of optimization can detect some of these.
- pmjordan 16y agoThere are optimizer and code generation bugs in compilers. In my experience these are much, much rarer than the bugs in my code that are optimisation level dependent...
- stcredzero 16y agoThen there's a whole lot more reasons to test with different optimization levels.
- pmjordan 16y agoDefinitely. Even better, have them run inside valgrind or a similar tool, as this type of bug is often laughably easy to locate that way, and sometimes devilishly difficult to find with more crude methods.
- stcredzero 16y agoWhen I was doing C/C++ we didn't have valgrind, or at least it wasn't widespread enough for me to hear about it.
- deleted 16y ago[deleted]