/Ox (Full Optimization)
Combines optimizing options to produce code that favors execution speed over smaller code size.
/Ox
/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.
Using /Ox is the same as using the following options:
-
/Ob n, where n = 2
-
Note The use of Full Optimization implies the use of the Frame Pointer Omission (/Oy (Frame-Pointer Omission)) option.
/Ox is mutually exclusive from:
/Ox also enables the Named Return Value optimization, which eliminates the copy constructor and destructor of a stack based return value. See /O1, /O2 (Minimize Size, Maximize Speed) for more information.
To set this compiler option in the Visual Studio development environment
-
Open the project's Property Pages dialog box. For details, see How to: Open Project Property Pages.
-
Click the C/C++ folder.
-
Click the Optimization property page.
-
Modify the Optimization property.
To set this compiler option programmatically
-
See Optimization.