[Shootout-list] Re: Stuff
   
    Aaron Denney
     
    wnoise@ofb.net
       
    Sun, 24 Apr 2005 09:31:35 +0000 (UTC)
    
    
  
On 2005-04-24, Pascal Obry <pascal@obry.net> wrote:
> I certainly do not agree. A garbage collector is certainly slower
> than a simple hand-written reference counter.
Well, a naive one may be.  Sophisticated ones are not.  Reference
counters need to be updated at essentially every access.  In
single-threaded environments one can get away with not being quite
so strict about count updates.  A full GC run can take a fair bit
of time, but it happens far less oftent than reference count updates,
so amortized, it's often faster.
> And I don't see why a garbage collector would make an algorithm
> implementation faster !!!!
Cheap sharing.
-- 
Aaron Denney
-><-