Maybe this is useful to some, like me. I read Kormen "Algorithms ..." and unexpectedly discovered that the release from debugging (Project-> Options-> Compiler-> Release) increases the execution speed at least 4 times. The program "Insertion Sort" for 32000 random integers in the range of values ​​of 31000 - 32000 was performed with debugging in 1.6 s, and without it in 0.36 s. Congratulations!

  • one
    live and learn, that's for sure - skegg
  • one
    Well, in production, no one debugs and does not include. It is only when developing it is required where the speed is not so important. - sysashi
  • Isn't it obvious that debugging slows down the speed of the program? As for me it is obvious - Zowie
  • Where is the question? Who saw the question here !? - BomBom

1 answer 1

Matter of course. Turning on debugging adds additional code to your program, some additional checks. In addition, code optimization is minimal in order to make debugging itself possible, otherwise the correspondence between machine code and source code will become unequivocal.