From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id AF6DABB91 for ; Sat, 23 Jul 2005 22:14:43 +0200 (CEST) Received: from conn.mc.mpls.visi.com (conn.mc.mpls.visi.com [208.42.156.2]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j6NKEglX019843 for ; Sat, 23 Jul 2005 22:14:43 +0200 Received: from [192.168.42.2] (bhurt.dsl.visi.com [208.42.141.66]) by conn.mc.mpls.visi.com (Postfix) with ESMTP id 0AE628123; Sat, 23 Jul 2005 15:14:42 -0500 (CDT) Date: Sat, 23 Jul 2005 15:15:01 -0500 (CDT) From: Brian Hurt X-X-Sender: bhurt@localhost.localdomain To: Thomas Fischbacher Cc: Stephane Glondu , caml-list@yquem.inria.fr Subject: Re: [Caml-list] How to do this properly with OCaml? In-Reply-To: Message-ID: References: <200507231218.13166.Stephane.Glondu@crans.org> <200507231250.45778.Stephane.Glondu@crans.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Miltered: at nez-perce with ID 42E2A532.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 heap:01 bookkeeping:01 posts:01 heap:01 2005,:98 wrote:01 data:02 overhead:03 brian:03 brian:03 jul:05 entries:05 elements:05 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 On Sat, 23 Jul 2005, Thomas Fischbacher wrote: > If I duplicate entries to fill up holes, and later on remove a > legitimate entry whose duplicates fill holes from the heap, I have to > introduce extra bookkeeping so that the other placeholder copies of that > entry are replaced as well - otherwise it could not be reclaimed by GC. I'd be very inclined just to use options- especially since, as you've mentioned in other posts, the elements you're putting into the heap are are fairly large and expensive to create. In this case, the overhead of options is small, relative to the rest of the data. Brian