English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Re: speed versus C
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1999-10-13 (07:11)
From: skaller <skaller@m...>
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