How does one find lazyness bottlenecks?

Manuel M. T. Chakravarty chak@cse.unsw.edu.au
Fri, 13 Oct 2000 15:16:48 +1100


Sengan <senganb@ia.nsc.com> wrote,

> Now that ghc 4.08 has a time profiler, I've been improving a program
> I wrote over the last year. However now the GC time dominates the
> execution time (>60%). I can see that my program is not being lazy,
> but I have no idea why. How can I use profiling (or any other means)
> to determine where my program is not being sufficiently lazy? Are there
> papers on such things I could read?

If GC times dominates, you probably have a space leak.  So,
you should use space profiling to determine where the leak
is.  Depending on what kind of program you have, it is often
also informative to check the space profiles for different
kinds of inputs, as the leak might only occur for certain
inputs.  Depending on the code exercised by the inputs
triggering the leak, you might get a rough idea which parts
of your program leak.

Cheers,
Manuel