Saturday, June 11, 2011
4:32 PM

Optimizing Code for Small Size

Many people know the -Os flag of gcc to reduce the code size. Now a while ago Benno posted some tipps to reduce the size of a compiled program for ARM, which give a good hint what to look for in any case. His Summary
"Compile to Thumb instructions.
Use -Os to optimise for space.
Look for unnecessary code.
Look for examples of registers used in the wrong place."

0 comments:

Post a Comment