开发者

Microsoft Visual C++ code optimization

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 s开发者_JS百科peed, or does it do better optimization than the other two options? Please clarify what it means.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜