title: In VC++ what is the #pragma equivalent of /O2 compiler option (optimize for speed)
body: <p>According to <a href="http://msdn.microsoft.com/en-us/library/8f8h5cxt.aspx" rel="nofollow noreferrer">msdn</a>, </p>
  
  <blockquote>
    <p>/O2 (Maximize Speed)</p>
  </blockquote>
  
  <p>is equivalent to</p>
  
  <blockquote>
    <p>/Og/Oi/Ot/Oy/Ob2/Gs/GF/Gy</p>
  </blockquote>
  
  <p>and according to <a href="http://msdn.microsoft.com/en-us/library/chh3fb0k%28VS.80%29.aspx" rel="nofollow noreferrer">msdn</a> again, the following pragma</p>
  
  <blockquote>
    <p>#pragma optimize( "[optimization-list]", {on | off} )</p>
  </blockquote>
  
  <p>uses the same letters in its "optimization-list" than the /O compiler option. Available letters for the pragma are:</p>
  
  <ul>
  <li><strong>g</strong> - <em>Enable global optimizations.</em> </li>
  <li><strong>p</strong> - <em>Improve floating-point consistency.</em> </li>
  <li><strong>s or t</strong> - <em>Specify short or fast sequences of machine code.</em> </li>
  <li><strong>y</strong> - <em>Generate frame pointers on the program stack.</em></li>
  </ul>
  
  <p>Which ones should I use to have the same meaning as /O2 ?</p>