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 TAA00568; Fri, 22 Feb 2002 19:04:50 +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 TAA31571 for ; Fri, 22 Feb 2002 19:04:49 +0100 (MET) Received: from mailb.telia.com (mailb.telia.com [194.22.194.6]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g1MI4n113320 for ; Fri, 22 Feb 2002 19:04:49 +0100 (MET) Received: from d1o902.telia.com (d1o902.telia.com [62.20.254.241]) by mailb.telia.com (8.11.6/8.11.6) with ESMTP id g1MI4ia04910; Fri, 22 Feb 2002 19:04:44 +0100 (CET) Received: from [62.20.254.221] (t2o902p101.telia.com [62.20.254.221]) by d1o902.telia.com (8.10.2/8.10.1) with ESMTP id g1MI4f214392; Fri, 22 Feb 2002 19:04:42 +0100 (CET) User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.02.2022 Date: Fri, 22 Feb 2002 19:10:21 +0100 Subject: Re: [Caml-list] local root registration From: Winfried Dreckmann To: Markus Mottl CC: =?ISO-8859-1?B?gA==?= caml list Message-ID: In-Reply-To: <20020222142741.GA22329@chopin.ai.univie.ac.at> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk on 22.02.2002 15:27 Uhr, Markus Mottl at markus@oefai.at wrote: > I can't remember that there were intentions to remove them. They rather > seem to be discouraged in favour of the new scheme whenever the latter > can be applied without tradeoffs. Yes. Maybe I misinterprete "supersede" in the documentation. > There should certainly be an efficient way to conditionally protect > roots, which cannot be done with the new macro scheme. That's what I mean. Thank you for expressing it in a few words. >> (see "lib/common/ml-alloc.h" in the numerix distribution). In this way, >> the price for garbage collection is only paid if allocation actually >> takes place. It seems impossible to achieve the same effect with >> CAMLxxx macros. > > If I am not seriously mistaken, only allocations on the OCaml-heap can > trigger a collection. There is just a small overhead associated with > (un)registering OCaml-values as reachable, but it's certainly a good idea > to remove every kind of unnecessary overhead in performance-critical code. I should have written "the price for registering is only paid if ...". Yes, the Ocaml interface for Numerix allocates on the Ocaml heap. Yes, the overhead would be small. But in some cases (lots of operations on "small" big integers) this makes a difference. Regards, Winfried Dreckmann ------------------- 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