Re: speed versus C

From: skaller (skaller@maxtal.com.au)
Date: Tue Oct 12 1999 - 22:42:26 MET DST


Date: Wed, 13 Oct 1999 06:42:26 +1000
From: skaller <skaller@maxtal.com.au>
To: Damien Doligez <Damien.Doligez@inria.fr>
Subject: Re: speed versus C

Damien Doligez wrote:

> As far as I can tell, you've been asking for three things:
>
> 1. Efficient finalization, with finalization functions written in O'Caml.
> 2. Correct finalization of circular references.
> 3. Immediate finalization: as soon as a value becomes unreachable, the
> finalization function is called.
 
> I don't know how to get all three together. It is likely that we'll
> have 1 and 2 in a future release of O'Caml.

        1 and 2 is good news! Now, Python does (3) by reference counting.
So it is always possible to do reference counting to get immediate
finalisation, there is an overhead in both time and space when
the garbage collector is used as well, and of course it doesn't
finalise unreachable circular references immediately.
But it is a good compromise, I believe Perl does something like this
(reference count, and clean up with a GC at the end).

-- 
John Skaller, mailto:skaller@maxtal.com.au
1/10 Toxteth Rd Glebe NSW 2037 Australia
homepage: http://www.maxtal.com.au/~skaller
downloads: http://www.triode.net.au/~skaller



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:27 MET