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

Achim Schneider barsoap at web.de
Fri Feb 20 10:55:04 EST 2009

Bulat Ziganshin <bulat.ziganshin at gmail.com> wrote:

> Hello Peter,
> Friday, February 20, 2009, 6:34:04 PM, you wrote:
> > Well C# does it with a for loop in 2300ms, and when using a
> > IEnumerable sequence it needs__19936ms. Very much like the Haskell
> > code. But of course the Haskell code could optimize the sum I guess,
> > I assume it is using the lazy version of sum by default.
> the question is what is the natural for every language
> > Anyway it was more of a question.__Does GHC perform register
> > allocation (e.g. using graph colouring) __and loop unrolling?
> afaik, ghc can be compared with 20-years old C compilers. it uses
> registers for performing tight loops but has very simple register
> allocation procedure. also it doesn't unroll loops
hmmm... do we have magic-hash vector types and folds and maps on them?
I'm only asking because gcc fails to use _anything_ but plain registers.

(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.

More information about the Haskell-Cafe mailing list