Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As a Gentoo user I have tried quite a few optimizations on the complete OS and there have been endless discussions on the <a href="http://forums.gentoo.org/" rel="noreferrer">Gentoo forums</a> about it. Some good flags for GCC can be found in the <a href="http://gentoo-wiki.com/Safe_Cflags" rel="noreferrer">wiki</a>.</p> <p>In short, optimizing for size worked best on an old Pentium3 laptop with limited ram, but on my main desktop machine with a Core2Duo, -O2 gave better results over all.</p> <p>There's also a <a href="http://www.pixelbeat.org/scripts/gcccpuopt" rel="noreferrer">small script</a> if you are interested in the x86 (32 bit) specific flags that are the most optimized.</p> <p>If you use gcc and really want to optimize a specific application, try <a href="http://www.coyotegulch.com/products/acovea/" rel="noreferrer">ACOVEA</a>. It runs a set of benchmarks, then recompile them with all possible combinations of compile flags. There's an example using Huffman encoding on the site (lower is better):</p> <pre><code>A relative graph of fitnesses: Acovea Best-of-the-Best: ************************************** (2.55366) Acovea Common Options: ******************************************* (2.86788) -O1: ********************************************** (3.0752) -O2: *********************************************** (3.12343) -O3: *********************************************** (3.1277) -O3 -ffast-math: ************************************************** (3.31539) -Os: ************************************************* (3.30573) </code></pre> <p>(Note that it found -Os to be the slowest on this Opteron system.)</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