Which gcc optimization flags should I use?
<p>If I want to minimize the time my c programs run, what optimization flags should I use (I want to keep it standard too)</p>

<p>Currently I'm using:</p>

<pre><code> -Wall -Wextra -pedantic -ansi -O3
</code></pre>

<p>Should I also use </p>

<pre><code>-std=c99
</code></pre>

<p>for example? </p>

<p>And is there I specific order I should put those flags on my makefile? Does it make any difference?</p>

<p>And also, is there any reason not to use all the optimization flags I can find? do they ever counter eachother or something like that?</p>