[Haskell-cafe] GHC predictability

Don Stewart dons at galois.com
Fri May 9 17:24:12 EDT 2008

>    Hello,
>    One frequent criticism of Haskell (and by extension GHC) is that it has
>    unpredictable performance and memory consumption. I personally do not find
>    this to be the case. I suspect that most programmer confusion is rooted in
>    shaky knowledge of lazy evaluation; and I have been able to fix, with
>    relative ease, the various performance problems I've run into. However I
>    am not doing any sort of performance critical computing (I care about
>    minutes or seconds, but not about milliseconds).
>    I would like to know what others think about this. Is GHC predictable? Is
>    a thorough knowledge of lazy evaluation good enough to write efficient
>    (whatever that means to you) code? Or is intimate knowledge of GHC's
>    innards necessary?
>    thanks,
>      Jeff
>    PS I am conflating Haskell and GHC because I use GHC (with its extensions)
>    and it produces (to my knowledge) the fastest code.

This has been my experience to. I'm not even sure where
"unpredicatiblity" would even come in, other than though not
understanding the demand patterns of the code.

It's relatively easy to look at the Core to get a precise understanding
of the runtime behaviour. 

I've also not found the GC unpredicatble either.

-- Don

More information about the Haskell-Cafe mailing list