On Sunday 11 February 2001 22:48, Jan Dubois wrote:
> Doing full GC in this fashion after failed API calls will probably wipe
> out any performance gain mark-and-sweep has over reference counting.

Well, after select failed API calls, not every call.  And mark-and-sweep, 
if that's the GC scheme used.  But that's not the only time GC would be 
done, meaning that Last Resort calls should/would never be called.  
I mean, scheme-independent, if you run out of memory or file descriptors, 
how fast is your code going to run?

> >Well, no.  My thought would be if A needed to be destroyed before B, 
then B 
> >wouldn't/shouldn't be marked for GC until after A was destroyed.  It 
might 
> >take several sweeps to clean an entire dependency tree, unfortunately.  
> 
> But *how* do you implement this dependency in a way that is *cheaper* than
> reference counting?  You can save some memory by only reference counting
> objects and not simple values, but this increases runtime cost beyond
> simply reference counting everything.

Well, if I knew this answer, I'd be a pillar of the Perl community.  :-)

-- 
Bryan C. Warnock
bwarnock@(gtemail.net|capita.com)

Reply via email to