 <p>It is very unlikely that the compiler will generate something different from the other. Nearly all modern processors have a <code>greater or equal</code> or <code>less or equal</code> comparison/branch operation, so there should be no reason to make a more complex comparison. </p> <p>The statement</p> <pre><code> if(x == y) if (x &lt; y) break; </code></pre> <p>doesn't make any sense. Either <code>x == y</code> is true, in which case <code>x &lt; y</code> is not true. Or <code>x == y</code> is false, and you don't enter the second if at all. </p> <p>Obviously, if <code>x</code> and <code>y</code> are a class, then the <code>operator&lt;=</code> may be written as:</p> <pre><code>operator&lt;=(const A&amp; x, const A&amp; y) { if (x == y) return true; return x &lt; y; } </code></pre> <p>But that would be rather daft, since it can just as well be written as :</p> <pre><code>operator&lt;=(const A&amp; x, const A&amp; y) { return !(x &gt; y); } </code></pre>