/O options (Optimize code)
/O options control various optimizations that help you create code for maximum speed or minimum size.
/O1sets a combination of optimizations that generate minimum size code.
/O2sets a combination of optimizations that optimizes code for maximum speed.
/Obcontrols inline function expansion.
/Oddisables optimization, to speed compilation and simplify debugging.
/Og(deprecated) enables global optimizations.
/Oigenerates intrinsic functions for appropriate function calls.
/Ostells the compiler to favor optimizations for size over optimizations for speed.
/Ot(a default setting) tells the compiler to favor optimizations for speed over optimizations for size.
/Oxis a combination option that selects several of the optimizations with an emphasis on speed.
/Oxis a strict subset of the
/Oysuppresses the creation of frame pointers on the call stack for quicker function calls.
You can combine multiple
/O options into a single option statement. For example,
/Odi is the same as
/Od /Oi. Certain options are mutually exclusive and cause a compiler error if used together. For more information, see the individual