An application note (PDF!) on code optimization in AVR microcontrollers from Atmel :
• Atmel® AVR® core and Atmel AVR GCC introduction
• Tips and tricks to reduce code size
• Tips and tricks to reduce execution time
• Examples application
AVR core is an advanced RISC architecture tuned for C code. It ensures the development of good products with more features at less cost.
When talking about optimization, we usually refer to two aspects: code size and code speed. Nowadays, C compilers have different optimization options to help developers get an efficient code on either size or speed.