Profiling burn-rate

Julian Seward (Intl Vendor) [email protected]
Mon, 9 Apr 2001 07:39:16 -0700


| Is there any way to profile the "burn-rate" of a Haskell program?
|=20
| Profiling as I understand it tells you what the "live" information
| on the heap is. It doesn't tell you what garbage collector has just
| freed. So, if a function were generating tons of intermediate values
| which it then immediately consumed, you wouldn't see it on=20
| the profile.
| Yet this is a place where rewriting the code or adding=20
| strictness could
| help reduce time spent garbage collecting.

At least in GHC, and, I suspect, for any system with a good
generational GC, the above may not really hold.  A good Gen GC
should get rid of short-lived junk very cheaply, since that's
what it's designed to do.  My experience is that a more effective
way to reduce GC time is to reduce the residency.  In other words
it's the area bounded by the space-time curve that counts, IMO.

J