Comparison Execution Speed
<p>I wrote a simple for loop like this.</p>

<pre><code>for(int i = 0; i != 100; i++) 
</code></pre>

<p>then someone gave an opinion that it should be </p>

<pre><code>for(int i = 0; i &lt; 100; i++) 
</code></pre>

<p>When this turns into assembly mine should turn into Jump on Equality JNE and the latter should be Jump if Greater JG. Or the compiler will do something completely different and it will both turn into the same thing.</p>

<p>Anyway which one is more correct, i find the first one more logically correct because it is known that i WILL pass 100, the greater than check seems logically reduntant. Also are JNE and JG as fast as each other?</p>
