From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 8146ABC0A for ; Mon, 19 Feb 2007 23:30:01 +0100 (CET) Received: from smtp112.sbc.mail.mud.yahoo.com (smtp112.sbc.mail.mud.yahoo.com [68.142.198.211]) by discorde.inria.fr (8.13.6/8.13.6) with SMTP id l1JMTxkJ018236 for ; Mon, 19 Feb 2007 23:30:00 +0100 Received: (qmail 27769 invoked from network); 19 Feb 2007 22:29:58 -0000 Received: from unknown (HELO ?192.168.1.100?) (rftp@pacbell.net@69.230.203.180 with plain) by smtp112.sbc.mail.mud.yahoo.com with SMTP; 19 Feb 2007 22:29:58 -0000 X-YMail-OSG: 8HAMQAsVM1moLphZLBg0zywllC8.A9m7aUrHnlSCLNN.Iw9wiaz5t5T.kT30q5FiJoM9GSzj5TSt5AZhnDqDKJ3d7PYZwtptg7BGSZS4tFPObx9j9cwZN39LIqb6ObIiS6gBGJTusg2EjFw- Message-ID: <45DA24D2.7070409@rftp.com> Date: Mon, 19 Feb 2007 14:29:38 -0800 From: Robert Roessler User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a3pre) Gecko/20070216 Mnenhy/0.7.4.0 SeaMonkey/1.5a MIME-Version: 1.0 To: Caml-list Subject: Re: [Caml-list] On registering values for use in C References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 45DA24E7.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; generational:01 ocaml:01 amortized:01 wrote:01 caml-list:01 gcs:01 implemented:02 tree:02 root:03 overhead:04 likely:08 generic:08 gray:90 example:10 copied:11 Nathaniel Gray wrote: > I have a question about registering values for use in C. I've read > that registering lots of values can have a bad effect on GC > performance, but what about registering "large" values? For example, > is registering a record with 20 fields just as bad as registering 10 > records with 2 fields each? Having implemented "generational" GCs, I can make a generic comment on this (without consulting the OCaml sources): as each one of the items you register represents a "root" (for our purposes, a tree of items which *may* or *may not* not be pointed to by any other item), there is a certain amount of per-root overhead that gets amortized over the items "marked" (or copied or whatever) during a GC. This being the case, it is likely that your case of "a record with 20 fields" will be "less bad" than your case of "10 records with 2 fields each". Robert Roessler roessler@rftp.com http://www.rftp.com