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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 78795BBAF for ; Sat, 5 Dec 2009 18:06:49 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.47,347,1257116400"; d="scan'208";a="51561691" Received: from bne75-9-88-168-234-79.fbx.proxad.net (HELO [192.168.0.62]) ([88.168.234.79]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/AES128-SHA; 05 Dec 2009 18:06:49 +0100 Message-Id: <95594484-7A9F-4ECA-B7A8-079D433BF4FB@inria.fr> From: Damien Doligez To: OCaml List In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: [Caml-list] Gc.compact surprisingly helpful Date: Sat, 5 Dec 2009 18:06:48 +0100 References: X-Mailer: Apple Mail (2.936) X-Spam: no; 0.00; damien:01 damien:01 compactions:01 compaction:01 2009:98 doligez:01 doligez:01 wrote:01 heap:01 heap:01 caml-list:01 loops:02 compacting:04 size:95 inria:06 On 2009-12-04, at 20:09, Aaron Bohannon wrote: > So in a 15 second run (with no > idle time, as I said), it now does about 130 heap compactions instead > of 3 and gets better total performance because of it, utterly defying > my GC intuition. What is the size of your heap? Have you tried compacting only once every 2, 3, 5, or 10 loops? One possible explanation is that compaction will also compact the free list into a few large blocks, which makes allocation faster. -- Damien