Feature Only in Professional and Enterprise Editions Code optimization is supported only in Visual C++ Professional and Enterprise Editions. For more information, see Visual C++ Editions.
/Os
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:
Note The /Os and /Ot options have their greatest effect when used with /Og (Global Optimizations).
/O options (Optimize Code) | Compiler Options | Setting Compiler Options