I couldn't find an answer to this one. Assuming optimization does not break the code, why is -O3
or -O2
optimization not the default in C/C++? Why should we explicitly pass this flag? I cannot think of any situation where you would want your code to be not optimized.
I really don't understand why is this question closed and how it's opinion based.