GCC: Difference between -O3 and -Os
The GCC documentation describes what these options do very explicitly. -O3 tries to optimize code very heavily for performance. It includes all of the optimizations -O2 includes, plus some more. -Os, on the other hand, instructs GCC to “optimize for size.” It enables all -O2 optimizations which do not increase the size of the executable, … Read more