optimize_for_size

Controls optimization to reduce the size of object code.

Syntax
  #pragma optimize_for_size on | off | reset  
Remarks

This setting lets you choose what the compiler does when it must decide between creating small code or fast code. If you enable this pragma, the compiler creates smaller object code at the expense of speed. This pragma does not effect the inline directive or the inlining of explicitly inlined functions. This pragma can be used in conjunction with the dont_inline pragma to decrease the code size. If you disable this pragma, the compiler creates faster object code at the expense of size.

The pragma corresponds to the Optimize for Size setting on the Global Optimizations panel. To check this setting, use __option (optimize_for_size), described in Checking Pragma Settings. By default, this pragma is disabled.