Export (0) Print
Expand All

/Ox (Full Optimization)

/Ox

/Ox combines optimizing options to produce code that favors execution speed over smaller code size. /Ox can be combined with /Os (/Oxs) to favor smaller code size (optimize for size).

In general, /O2 should be preferred over /Ox and /O1 over /Oxs.

The effect is the same as using the following options:

  • /Obn, where n = 2
  • /Og
  • /Oi
  • /Os, /O, /Ot
  • /Oy
    Note   The use of Full Optimization implies the use of the Frame Pointer Omission (/Oy) option.

/Ox is mutually exclusive from:

To set this compiler option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
  2. Click the C/C++ folder.
  3. Click the Optimization property page.
  4. Modify the Optimization property.

To set this compiler option programmatically

See Optimization Property.

See Also

/O Options (Optimize Code) | Compiler Options | Setting Compiler Options

Show:
© 2014 Microsoft