Optimize in Visual C++

OverviewDetails

Feature Only in Professional and Enterprise Editions   Code optimization is supported only in Visual C++ Professional and Enterprise Editions. For more information, see .

To use the development environment to select optimizations for a project

  1. On the Project menu, click Settings.

  2. In the Project Settings dialog box, click the C/C++ tab.

  3. In the Settings For box, select (highlight) a configuration. For example, select a Release build.

  4. In the Category drop-down box, click Optimizations.

You will now see a drop-down list box titled Optimizations. This list lets you determine how the compiler fine-tunes the performance of your program.

Default

Command line equivalent of /Ot switch.

Disable (Debug)

Command-line equivalent of /Od switch.

Maximize Speed

Command line equivalent of /O2 switch.

Minimize Size

Command line equivalent of /O1 switch.

Customize

The Customize option enables the check boxes that allow you to select optimizations. If you do not check any optimizations, Customize will cause the compiler to make decisions that favor a faster executable. There will be no inline expansion of functions. See Optimization Switches for more information on the options you can choose in the Customize list as well as for optimization switches that you can use that are not in the check list.

For information on functionality in the C/C++ tab of the Project Settings dialog box, see: