Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>To be pedantic, there are 8 different valid -O options you can give to gcc, though there are some that mean the same thing. </p> <p>The original version of this answer stated there were 7 options. GCC has since added <code>-Og</code> to bring the total to 8</p> <p>From the <a href="http://linux.die.net/man/1/gcc" rel="noreferrer">man page:</a></p> <ul> <li><code>-O</code> (Same as <code>-O1</code>) </li> <li><code>-O0</code> (do no optimization, the default if no optimization level is specified)</li> <li><code>-O1</code> (optimize minimally)</li> <li><code>-O2</code> (optimize more)</li> <li><code>-O3</code> (optimize even more)</li> <li><code>-Ofast</code> (optimize very aggressively to the point of breaking standard compliance)</li> <li><code>-Og</code> (Optimize debugging experience. -Og enables optimizations that do not interfere with debugging. It should be the optimization level of choice for the standard edit-compile-debug cycle, offering a reasonable level of optimization while maintaining fast compilation and a good debugging experience.)</li> <li><code>-Os</code> (Optimize for size. <code>-Os</code> enables all <code>-O2</code> optimizations that do not typically increase code size. It also performs further optimizations designed to reduce code size. <code>-Os</code> disables the following optimization flags: <code>-falign-functions -falign-jumps -falign-loops -falign-labels -freorder-blocks -freorder-blocks-and-partition -fprefetch-loop-arrays -ftree-vect-loop-version</code>)</li> </ul> <p>There may also be platform specific optimizations, as @pauldoo notes, OS X has <code>-Oz</code></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload