From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA03008; Sun, 24 Feb 2002 18:28:26 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA03579 for ; Sun, 24 Feb 2002 18:28:25 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g1OHSN117359; Sun, 24 Feb 2002 18:28:23 +0100 (MET) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA03427; Sun, 24 Feb 2002 18:28:23 +0100 (MET) Date: Sun, 24 Feb 2002 18:28:22 +0100 From: Xavier Leroy To: Winfried Dreckmann Cc: =?iso-8859-1?Q?=80_caml_list?= Subject: Re: [Caml-list] local root registration Message-ID: <20020224182822.B3575@pauillac.inria.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from wd@lidingo.mail.telia.com on Fri, Feb 22, 2002 at 01:06:16PM +0100 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > > We've been through several designs for the "local root registration" API. > > The CAMLxxx macros are the latest design, and the one that we think is > > the easiest to use. > > I agree that they are easiest if one strictly follows the rules in the > documentation. However, I would like to point out that there are cases where > one does not want to do this. In these cases, the older macros (Begin_roots > and End_roots) are much more flexible, and can even lead to better code. I agree there are cases where root registration is required only on rarely-executed paths, and in this case Begin_roots/End_roots allow avoiding the cost of root registration on other paths. I haven't measured how much speed is gained this way. Probably not much, since GC root registration is relatively simple. > I will discuss this a little. Perhaps the Begin_roots/End_roots macros > should not be deprecated, but left as a low level alternative? Begin_roots/End_roots will remain defined for a long time, if only because I still have some old code that use these macros, and (as regulars on this list know) I don't like gratuitous breaking of old code. The only problem with documenting them as a low-level alternative to CAMLparam is that the chapter "Interfacing Caml with C" of the documentation is already huge and quite hard to read! Perhaps a different organization of this chapter (e.g. a separate chapter for "Advanced topics in interfacing Caml with C") is in order. - Xavier Leroy ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners