[Shootout-list] Re: Stuff

Robert Seeger Robert Seeger <rhseeger@gmail.com>
Sun, 24 Apr 2005 12:31:17 -0400


Of course, there are also situations where neither a refcount nor
mark/sweep garbage collection mechanism will work, and it is necessary
to handle cleaning up their own resources/memory.

Rob Seeger

On 4/24/05, Jon Harrop <jon@ffconsultancy.com> wrote:
> On Sunday 24 April 2005 10:31, Aaron Denney wrote:
> > 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.
>=20
> More importantly, reference counters tend to access memory randomly which
> costs a great deal on modern hardware. In contrast, garbage collectors ca=
n be
> optimised to try to access memory more sequentially and more localised.
>=20
> I think it is now generally accepted that a good GC is faster than refere=
nce
> counting and, more importantly, can be guaranteed to work.
>=20
> --
> Dr Jon D Harrop, Flying Frog Consultancy Ltd.
> Objective CAML for Scientists
> http://www.ffconsultancy.com/products/ocaml_for_scientists
>=20
> _______________________________________________
> Shootout-list mailing list
> Shootout-list@lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/shootout-list
>