<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="h5">&gt; I&#39;ve always wondered, is it imaginable that a compiler would be able to<br>

&gt; do such transforms (assuming very intelligent people (i.e. not me)<br>
&gt; have plenty of time to work on it), or is it way too complicated ?<br></div></div></blockquote><div>... </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Spotting more patterns would require more code in the compiler, and it<br>

would increase compile times.<br>
<br>
So one has to decide whether the cost is worth the benefit.<br>
Apparently, so far it has not been considered worthwhile.</blockquote><div> </div><div>It seems to me that, in almost every case, the cost of performance slow-down is greater than the cost of compilation slow-down.</div>
<div><br></div><div>Tom</div><div> </div></div>