GC performance - was Re: [gclist] GC topics

fjh@cs.mu.OZ.AU fjh@cs.mu.OZ.AU
Fri, 23 Feb 1996 17:19:27 +1100 (EDT)


Darius Blasband, you wrote:
> 
> > Another complication in Mercury is partially instantiated data structures.
> > The Mercury compiler generates code in which data structures are not
> > fully initialized.  Unless you're willing to take the performance hit
> > of fully initializing all data structures, this requires additional
> > complication in the generation of the info for garbage collection.
> > (We're implementing precise garbage collection in the hope of improving
> > performance, so we don't want to take this hit.)
>
> Why don't you just do this: initialize all data structures, then remove
> this initialization just to be able to evaluate the cost in terms of 
> performance of this operation. I think it is always safer to rely on
> facts when dealing with performance. 

I agree that it is much better to measure than to guess.  Unfortunately
we don't yet have a good set of realistic Mercury programs that make
use of partially instantiated data structures which we could use to
measure this.

In any case, the complication of getting precise GC to handle partially
instantiated data structures is probably comparable to the complexity
of getting the compiler to initialize all data structures, and since
the latter has a performance penalty, we'll probably implement the former.

-- 
Fergus Henderson             	WWW: http://www.cs.mu.oz.au/~fjh
fjh@cs.mu.oz.au              	PGP: finger fjh@128.250.37.3