/O1, /O2 (Minimize Size, Maximize Speed)
Visual Studio .NET 2003
/O1 /O2
These options select a predefined set of options that affect the size and speed of files as follows:
| Option | Equivalent to | Comment |
|---|---|---|
| /O1 (Minimize Size) | /Og /Os /Oy /Ob2 /Gs /GF /Gy | Creates the smallest code in the majority of cases. |
| /O2 (Maximize Speed) | /Og /Oi /Ot /Oy /Ob2 /Gs /GF /Gy | Creates the fastest code in the majority of cases. (Default setting for release builds) |
x86 Specific >
You can use other options to improve the size or speed of many applications (for example, the /G5 option to generate code optimized for the Pentium processor).
These options imply the use of the Frame-Pointer Omission (/Oy) option.
END x86 Specific
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
See Also
/O Options (Optimize Code) | Compiler Options | Setting Compiler Options | /EH