develooper Front page | perl.perl6.language | Postings from February 2001

Re: Garbage collection (was Re: JWZ on s/Java/Perl/)

Sam Tregar
February 12, 2001 10:39
Re: Garbage collection (was Re: JWZ on s/Java/Perl/)
Message ID:
On Mon, 12 Feb 2001, Dan Sugalski wrote:

> >I think I've heard you state that before.  Can you be more specific?  What
> >alternate system do you have in mind?  Is this just wishful thinking?
> This isn't just wishful thinking, no.

You picked the easy one.  Maybe you can get back to the other two when you
have more time?

> Code flow analysis can get an awful lot. Some help from the runtime will
> get the rest.

Do you mean that you can tell from a compile-time flow-control graph
exactly when DESTROY needs to be called for every object?  What kind of
help from the runtime?  Reference counting help?

> It's reasonably obvious (which is to say "cheap") which variables aren't
> involved with anything finalizable.

Probably a simple bit check and branch.  Is that cheap?  I guess it must

> Nowhere near double the penalty. We only need to deal with refcounts when
> references are actually taken, assigned, or destroyed. That's a rare
> occurrence, relatively speaking.

Perhaps.  It's not rare in OO Perl which is coincidentally one area in
serious need of a speedup.  I suppose I'm warped by my own experience -
all the code I see every day is filled with references and objects.
That's probably not the average case Perl usage.

-sam Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About