Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Feature Only in Professional and Enterprise Editions Code optimization is supported only in Visual C++ Professional and Enterprise Editions. For more information, see .
The CL (Compile and Link) command has switches you can use to effect optimization. See Optimization Switches for a list and description of the switches.
Using the /O2 switch as an example, you might issue
cl /O2 source.c
to maximize your executable for speed.
There is an abbreviated syntax for using more than one switch. If you want to use /Og and /Os, for example, you could specify /Ogs.