-O0 No optimization. This is the same as not specifying any optimization.
-O1 Optimize. Reduces code size and execution time without performing any optimizations that take a great deal of compilation time.
-O2 Optimize even more. avr-gcc performs almost all optimizations that don't involve a space-time tradeoff.
-O3 Optimize yet more. This level performs all optimizations at -O2 along with -finline-functions and - frename-registers.
-Os Optimize for size. Enables all -O2 optimizations that don't increase code size. It also performs further optimizations designed to reduce code size.