In debug mode, you need overhead. You want it to detect that you have broken your stack, overflowed your buffers, etc. This overhead is built into the debugging tools and the debugger. In high-level terms, debugging equipment is additional code and data placed there to help flag errors, and the debugger detects the errors noted and notifies the user (in addition to helping you debug, of course).
If you are working with a project compiled in release mode or without a connected debugger, there is no one to hear the cry of your program when it dies :) If the tree falls into the forest ...
Depending on how you program, C ++ programs without preparing the wheels. If you hit a wall, nobody will be there to tell you that you squinted. You just crash and burn, or, even worse, crash and continue to run in a very distorted state, not knowing that something is wrong. Because of this, it can be very fast. There are no unnecessary checks or protective fences to prevent it from breaking through your program at full speed and processor potential (and, of course, how many additional steps you encoded in your program).
source share