<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Aug 20, 2014 at 11:05 AM, Johan Holmquist <span dir="ltr"><<a href="mailto:holmisen@gmail.com" target="_blank">holmisen@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div class=""><div>> I think the reason it isn't done is that it's not always an optimization<br>

</div></div></div><div class=""><br></div></div>Could you explain when it's not?</div></div></div></div></blockquote><div><br></div><div>A simple example is when the two values aren't equal, as you'll be doing one more branch than you otherwise would. The extra branch might also hurt the branch predictor even in the equal case, if the branch is hard to predict.</div>

</div></div></div>