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 06677BDCB for ; Sat, 10 Sep 2005 15:04:32 +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 j8AD4ViT003530 for ; Sat, 10 Sep 2005 15:04:31 +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 PAA04141 for ; Sat, 10 Sep 2005 15:04:30 +0200 (MET DST) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.193]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j8AD4T8e003526 for ; Sat, 10 Sep 2005 15:04:30 +0200 Received: by wproxy.gmail.com with SMTP id 68so1827695wra for ; Sat, 10 Sep 2005 06:04:26 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=rk9rcQURo/4SKNR5PPq5aZKZNW2g/wsu+GfxDLlBZlGYaaeJ3xgF/zC0TiUb1YFAT6pEl5bCiMdgk6tgFrM4WbiCg6guAxugUSqormOd/D+etlkNuIjOQw1SWRzw2EqD7p/FTB08PevclJKnDP8UBjr7+obZXojh7TctuoTr9kM= Received: by 10.54.118.9 with SMTP id q9mr1175883wrc; Sat, 10 Sep 2005 06:04:26 -0700 (PDT) Received: by 10.54.154.2 with HTTP; Sat, 10 Sep 2005 06:04:26 -0700 (PDT) Message-ID: <891bd33905091006047a55b73f@mail.gmail.com> Date: Sat, 10 Sep 2005 09:04:26 -0400 From: Yaron Minsky Reply-To: yminsky@cs.cornell.edu To: Xavier Leroy Subject: Re: [Caml-list] Re: announce: callbacks-0.1 Cc: Bardur Arantsson , caml-list@inria.fr In-Reply-To: <43228592.1040800@inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <43206744.5090907@univ-savoie.fr> <4320A68E.1060608@xs4all.nl> <4320ABF7.7020009@univ-savoie.fr> <43228592.1040800@inria.fr> X-Miltered: at concorde with ID 4322D9DF.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 4322D9DD.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; yaron:01 minsky:01 yminsky:01 caml-list:01 hashtable:01 generational:01 minor:01 callbacks:01 minor:01 callbacks:01 hashtbl:01 yaron:01 200,000:98 wrote:01 roots:02 On 9/10/05, Xavier Leroy wrote: > I would have been very interested in a profiling of your initial > implementation. The only reason why the Caml hashtable can beat the > global roots is that the latter are not generational: since the > contents of registered global roots can change at any time without > notifying the GC, all global roots must be scanned at every minor > collection. Yeah, we ran into this problem. We had an application where we ended up registering about 200,000 global roots (most of which were callbacks.) The application spent around 15% of the CPU all the time just scanning global roots as part of minor collections. The callbacks were moved into a hashtbl,and these problems went away completely. Yaron