Can (x==0) be more efficient than (0==x)?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/4624536/which-one-will-execute-faster-ifflag-0-or-if0-flag">Which one will execute faster, if(flag==0) or if(0==flag)?</a>  </p>
</blockquote>



<p>I usually write my equality conditions as:</p>

<pre><code>if(0==x)
</code></pre>

<p>as many people do, instead of</p>

<pre><code>if(x==0) 
</code></pre>

<p>so that the compiler will tell me when I accidentally type = instead of ==.</p>

<p>Someone told me that some compilers implement this as two register loads, instead of one using a not-equal-zero operation, and so it is less efficient. </p>

<p>Anyone know if this is a reasonable comment?</p>
