ABC of Electronics cosycom.com
EMBEDDED SYSTEMS & MICROCONTROLLERS · PAGE 89

Reading Compiler Output

See what your C really does.

Ask the compiler to produce assembly, or disassemble the finished file, and read the instructions generated for a short function. This reveals how many cycles it takes.

Compare optimisation levels. Seeing a loop turned into a few instructions, or a variable kept in a register, teaches more than any manual.