/Ox (Full Optimization)
/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
- /Os, /O, /Ot
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
- Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
- Click the C/C++ folder.
- Click the Optimization property page.
- Modify the Optimization property.
To set this compiler option programmatically