Earlier quoted context omitted.
I’m always surprised when I see you here but I’m not sure why. Anyway. I can corroborate this. Debug code is /really/ harming performance in AAA games. Also, you want to remove your “cheats” that QC use to skip chunks of the game.
It really depends on what you mean by "debug code". If you mean special versions of the code built with "-O0 -g" (or the equivalent in whatever compiler/toolchain they're using) then obviously that's going to be a problem. If it's just helper methods like "go directly to section X in the game", "spawn any monster" or "if global variable DEBUG is 1 then log this" then that can easily make it in the final product if th…
Maybe (uncharitably) you’re trying to look smart or maybe you’re also in the industry and I just don’t understand what you’re saying :/
When I talk about “debug” builds it’s actually a large thing; Not _only_ is it switching the compiler (Microsoft C++ compiler ofc) to build stripped/optimised binaries, it’s also removing things like, built in command consoles, logging subsystems and “phase handlers”, budget profiling for subcomponents of the game (AI, lighting/shadows, props) and also removing all assert statements.
Simple things (like asserts, which are essentially switch statements) need to run in tandem with other processes, when you’re trying to push 60/120 frames per second nearly every switch statement is going to “cost” something. That cost can be high very quickly. So, you don’t tend to leave things in which check conditions of various environment variables.