Who executes faster - for or while loop
<p>So basically I would like to know, who is faster from these loops in C++ language?
Basically, which of these examples would compile faster -</p>

<pre><code>int S = 1, D = 2, d = 1;
for(int x = 0; x &lt; 10000; x++) {
  S += D/2-d *s;
}
</code></pre>

<p>and</p>

<pre><code>int S = 1, D = 2, d = 1, x = 0;
while(x &lt; 10000) {
  x++;
  S += D/2-d * S;
}
</code></pre>
