[Haskell-cafe] GHC predictability

Abhay Parvate abhay.parvate at gmail.com
Mon May 12 02:35:41 EDT 2008

As a beginner, I had found the behaviour quite unpredictable. But with time
I found that I could reason out the behaviour with my slowly growing
knowledge of laziness. I don't spot all the places in my program that will
suck while writing a program, but post facto many things become clear. (And
then there is the profiler!)

GHC's internal details had been never necessary to me! I aspire to write
computationally heavy programs in haskell in future, and I have been
successful in reaching factors of 3 to 5 with C programs (though I have not
been upto factors of 1 for which I find claims here and there) without any
knowledge of GHC internals. But the GHC user guide is immensely valuable.

I would like to note that beginners' codes are many times time/memory
consuming even in slighly complicated cases, and it may be a big source of
frustration and turn-away if they don't stick up and pursue. This is not a
problem of GHC, or even Haskell; it generally applies to functional

These are my opinions; I am only an advanced beginner :)

2008/5/10 Jeff Polakow <jeff.polakow at db.com>:

> 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 e-mail may contain confidential and/or privileged information. If you
> are not the intended recipient (or have received this e-mail in error)
> please notify the sender immediately and destroy this e-mail. Any
> unauthorized copying, disclosure or distribution of the material in this
> e-mail is strictly forbidden.
> _______________________________________________
> 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/20080512/50541ab0/attachment.htm

More information about the Haskell-Cafe mailing list