/Os (Favor Small Code)
| Overview | How Do I | Compiler Options
Feature Only in Professional and Enterprise Editions Code optimization is supported only in Visual C++ Professional and Enterprise Editions. For more information, see .
This option minimizes the size of executable files and DLLs by instructing the compiler to favor size over speed. The compiler can reduce many C and C++ constructs to functionally similar sequences of machine code. Occasionally these differences offer tradeoffs of size versus speed. The /Os and /Ot (Favor Fast Code) options allow you to specify a preference for one over the other:
To find this option in the development environment, click Settings on the Project menu. Then click the C/C++ tab, and click Optimizations in the Category box. Under Optimizations, click Customize.
Note The /Os and /Ot options have their greatest effect when used with /Og (Global Optimizations).