views:

121

answers:

2

In MSVC, there are four options for code optimization:

  • No Optimization
  • Minimize Size
  • Maximize Speed
  • Full Optimization

The first three are self-explanatory, but I am unsure about Full Optimization. Does this try to find a balance between size and speed, or does it do better optimization than the other two options? Please clarify what it means.

+8  A: 

It appears to be speed optimization, with some extra optimizations turned on. It's fully explained online here.

Using /Ox is the same as using the following options:

/Obn, where n = 2

/Og (Global Optimizations)

/Oi (Generate Intrinsic Functions)

/Os, /Ot (Favor Small Code, Favor Fast Code)

/Oy (Frame-Pointer Omission)

Note The use of Full Optimization implies the use of the Frame Pointer Omission (/Oy (Frame-Pointer Omission)) option.

T.E.D.
+1  A: 

You can find your answer here:

ronag