Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 speed, or does it do better optimization than the other two options? Please clarify what it means.

like image 800
Alexander Rafferty Avatar asked Oct 05 '10 13:10

Alexander Rafferty


1 Answers

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.

like image 138
T.E.D. Avatar answered Oct 23 '22 02:10

T.E.D.