[Haskell-cafe] speed: ghc vs gcc
Peter Verswyvelen
bugfact at gmail.com
Fri Feb 20 18:42:11 EST 2009
On Sat, Feb 21, 2009 at 12:22 AM, Bulat Ziganshin <bulat.ziganshin at gmail.com
> wrote:
> Hello Khudyakov,
>
> Saturday, February 21, 2009, 2:07:39 AM, you wrote:
>
> > I have another question. Why shouldn't compiler realize that `sum
> [1..10^9]'
> > is constant and thus evaluate it at compile time?
>
> since we expect that compilation will be done in reasonable amount of
> time. you cannot guarantee this for list-involving computation
it would be nice to have a compiler that can run forever, incrementally
generating faster and faster versions of the same program, until you press a
key or a timeout is reached.
then you just let it run before you get to bed ;-)
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.
some C++ compilers can already do this (profile based optimization).
>
> --
> Best regards,
> Bulat mailto:Bulat.Ziganshin at gmail.com
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090221/ac5e10ec/attachment.htm
More information about the Haskell-Cafe
mailing list