From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id E45DABCA2 for ; Thu, 18 Aug 2005 19:13:34 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j7IHDYt1032355 for ; Thu, 18 Aug 2005 19:13:34 +0200 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 TAA08044 for ; Thu, 18 Aug 2005 19:13:34 +0200 (MET DST) Received: from smtp1.adl2.internode.on.net (smtp1.adl2.internode.on.net [203.16.214.181]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j7IHDVae032351 for ; Thu, 18 Aug 2005 19:13:33 +0200 Received: from rosella (ppp14-151.lns2.syd7.internode.on.net [59.167.14.151]) by smtp1.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id j7IHDMdK078235; Fri, 19 Aug 2005 02:43:22 +0930 (CST) Subject: Re: [Caml-list] Cost of register_global_root (was: Stopping a value from getting GC'd) From: skaller To: Markus Mottl Cc: Nathaniel Gray , ocaml In-Reply-To: References: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-H3/uxoSfzUbuHGnqP0pY" Date: Fri, 19 Aug 2005 03:13:21 +1000 Message-Id: <1124385201.8402.10.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1.1 X-Miltered: at concorde with ID 4304C1BE.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 4304C1BB.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 gc'd:01 markus:01 mottl:01 afaik:01 minor:01 pointers:01 hashtable:01 wrote:01 wrote:01 sourceforge:01 sourceforge:01 roots:02 root:03 root:03 X-Attachments: type="application/pgp-signature" name="signature.asc" X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 --=-H3/uxoSfzUbuHGnqP0pY Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 2005-08-17 at 23:57 -0400, Markus Mottl wrote: > On 8/17/05, Nathaniel Gray wrote: > > One thing that the FM doesn't mention is how expensive it is to > > register a global root. Can I register thousands of them or will > > there be performance problems? >=20 > There is a severe performance penalty for registering many thousands > of roots as I have seen in one of our applications. AFAIK, they are > scanned at each minor collection. This will drive up CPU-usage even > if your program doesn't do much otherwise. Maybe the GC could be > improved in that area. Why not just put the pointers into a (reachable) hashtable? --=20 John Skaller --=-H3/uxoSfzUbuHGnqP0pY Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQBDBMGwsRp8/9aGVGsRArC2AKCJJ5m68IgLUFv8NKx/AbvrUza85ACdHib5 Dhdu9rMe2kLD1CLnxZr248s= =xvKB -----END PGP SIGNATURE----- --=-H3/uxoSfzUbuHGnqP0pY--