/Oc Compiler Option

Syntax: Default:
/Oc[+|-] /Oc-

Use /Oc to optimize code for size as well as speed. You must also specify /O.

/Oc performs a set of optimizations similar to those performed by /O, with a goal of minimizing the size of the code. Code optimized with /Oc is not slower than unoptimized code, and is likely to be faster, though not as fast as code optimized with /O on its own.

For example, /Oc stops loops from being unrolled, and stops most inlining (unless you specified a conflicting /Oi value).

Note: The debugger may operate unpredictably with optimized code.

By default, the code is not optimized.



Overview of Optimization
Notes on Debugging Optimized Code


Summary of Compiler Options
Summary of Compiler Options to Enable Optimization