<div>On Sat, Feb 21, 2009 at 12:22 AM, Bulat Ziganshin <span dir="ltr">&lt;<a href="mailto:bulat.ziganshin@gmail.com">bulat.ziganshin@gmail.com</a>&gt;</span> wrote:<br></div><div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello Khudyakov,<br>
<div class="Ih2E3d"><br>
Saturday, February 21, 2009, 2:07:39 AM, you wrote:<br>
<br>
&gt; I have another question. Why shouldn&#39;t compiler realize that `sum [1..10^9]&#39;<br>
&gt; is constant and thus evaluate it at compile time?<br>
<br>
</div>since we expect that compilation will be done in reasonable amount of<br>
time. you cannot guarantee this for list-involving computation</blockquote><div><br></div>it would be nice to have a compiler that can run forever,&nbsp;incrementally generating faster and faster versions of the same program, until you press a key or a timeout is reached.</div>
<div class="gmail_quote"><br></div><div class="gmail_quote"><div>then you just let it run before you get to bed ;-)&nbsp;</div><div><br></div></div><div class="gmail_quote">you could even pass it in a test data set to which it must be optimized; after the program is compiled, the compiler runs and profiles it, measures the results, and does another pass to make it faster.</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">some C++ compilers can already do this (profile based optimization).</div><div class="gmail_quote"><br></div><div class="gmail_quote"><div><br></div><div><br></div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
<div class="Ih2E3d"><br>
--<br>
Best regards,<br>
&nbsp;Bulat &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mailto:<a href="mailto:Bulat.Ziganshin@gmail.com">Bulat.Ziganshin@gmail.com</a><br>
<br>
_______________________________________________<br>
</div><div><div></div><div class="Wj3C7c">Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div></div>