Fwd: Re: [Haskell-cafe] speed: ghc vs gcc

Khudyakov Alexey alexey.skladnoy at gmail.com
Sat Feb 21 16:58:59 EST 2009


Oh I've again sent mail to wrong address
----------  Forwarded Message  ----------

On Saturday 21 February 2009 02:42:11 you wrote:
> 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.
>
I've just remembered another but related approach to optimization. It uses 
genetic algorithm to determine close to the best set of optimization options. 
Alternatively it could be used to find badly interacting options, 
pessimizations. 

Implementation for gcc is here: 
http://www.coyotegulch.com/products/acovea/

In fact I didn't tried it but I liked the idea. 

--
  Khudaykov Alexey



More information about the Haskell-Cafe mailing list