Thu, 17 Apr 1997 10:15:43 -0700
I'll try to bring this to a close, and only mention new issues that came up.
On Apr 17, 11:06am, Carl Bruggeman wrote:
> [I wrote:]
> > I've always found that moderately frequent full collections are
> > necessary for the kind of environment I've been dealing with.)
> They probably are necessary with only 2 generations. This is why
> timely finalization is so important (see below)
I guess this is another recurring disagreement on this list. I believe
they're inherently necessary. Generational collection helps performance in
most cases, sometimes substantially, but by itself it's not a reliable way to
get performance. You need reasonably fast incremental full collection strategy
to back it up.
My experience has been that even with our collector, the most visible garbage
collector performance issues occur with the construction of large, relatively
long-lived in-memory data structures. My canonical example at PARC were
multi-megabyte mail files. These accounted for a significant fraction of all
allocation, had a lifetime of at least hours, and I suspect their expected
lifetimes were not at all correlated to their age. Such data structures don't
get constructed during standard Scheme or ML benchmarks. But that's a mistake.
They are important if you try to do real work on one of these systems (which
doesn't imply that reading mail is real work).
> But we already agreed that 80% of the time, finalization order is
> independent (not data dependent) and, more importantly, there are some
> cases (<10%) where the data dependent order is different from the
> finalization order. So, topological order gives you a mechanism that is
> "natural" for 90% of the cases (where guardians gives it to you
> "naturally" in 80% of the cases). Both approaches require more work
> in some of the other cases. It not that topological ordering is a
> silver bullet in 90% of the cases, its that it is a silver bullet in
> 10-20% of the cases, and is just one of the orderings which is
> acceptable in the other 80% of the cases. I really like "natural"
> solutions when they work 100% of the the time (such as garbage
> collection); they lose their luster quickly, for me, when they are not
> the "right thing" in cases that you want to be able to support.
I would argue that topologically ordered finalization is equivalent to
guardians in something like 80% of the cases. In all other cases I know about,
I would prefer topological ordering. There may be some small number of cases
for which guardians are more convenient, but I think we're lacking an example