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 E6EB4BC57 for ; Sun, 28 Nov 2010 20:59:57 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvkBABdD8kzRVde0kGdsb2JhbACVB415CBUBAQEBCQkMBxEDH6c9i3wBBY0GAQSFRw X-IronPort-AV: E=Sophos;i="4.59,272,1288566000"; d="scan'208";a="80349912" Received: from mail-ey0-f180.google.com ([209.85.215.180]) by mail4-smtp-sop.national.inria.fr with ESMTP; 28 Nov 2010 20:59:57 +0100 Received: by eyf18 with SMTP id 18so1486326eyf.39 for ; Sun, 28 Nov 2010 11:59:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=sJh1gdffvO/yIF7bgbUh2paPx1K97TIIILJvBKuwFrk=; b=wgaVkgbwuaYsQT+Ac95/+MuiQsplQPD5zj5noXr915OSDDBxWiF5hprKhBWzlOAAPo fjaNIZ4O4lT+jqo7oOg+TweBAkEPmhTbG6yCQc5Xf+H5uCFXuaMED8rMmtNZsfvErO4T I1x3LiIAVaFymMwfx2jcTODw7bN3jH8qLXyxU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=hlNjvy1vtrAV+IXssxez22G4Azs3xFkIb17HTuDoUcN3Y/pFIZ2srMfTJRUK1c9aDg L9L6e7h7w9q7SMNQq1Dq4bV4aztpSQMaMTEFahiub481uy84AVfkTRKNI7QgR8JjvtuU Ee0kbmucyUoqXwvq3aXsNTpQDcjWbAtZ1b0J8= Received: by 10.213.34.73 with SMTP id k9mr411508ebd.78.1290974396927; Sun, 28 Nov 2010 11:59:56 -0800 (PST) Received: from bespin.kosmos.all (ip-95-223-170-32.unitymediagroup.de [95.223.170.32]) by mx.google.com with ESMTPS id b52sm4364359eei.7.2010.11.28.11.59.55 (version=SSLv3 cipher=RC4-MD5); Sun, 28 Nov 2010 11:59:56 -0800 (PST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Apple Message framework v1081) Subject: Re: [Caml-list] OCaml GC [was Is OCaml fast?] From: Benedikt Meurer In-Reply-To: <08df01cb8f34$299d5800$7cd80800$@com> Date: Sun, 28 Nov 2010 20:59:54 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <208D27C6-A2CD-4383-8667-F4988301D265@googlemail.com> References: <1290434674.16005.354.camel@thinkpad> <582306206.731582.1290438133628.JavaMail.root@zmbs4.inria.fr> <20101122203334.7adc5ee6@deb0> <20101127221121.0920db65@ordinaves.concept-micro.com> <4CF25878.4060202@univ-savoie.fr> <08df01cb8f34$299d5800$7cd80800$@com> To: caml-list@yquem.inria.fr X-Mailer: Apple Mail (2.1081) X-Spam: no; 0.00; ocaml:01 ocaml:01 locality:01 28,:98 pathological:98 incremental:01 wrote:01 avoids:01 caml-list:01 behaviour:01 algorithm:01 tree:02 chunk:02 objects:02 objects:02 On Nov 28, 2010, at 20:40 , Jon Harrop wrote: > I don=92t understand why this would help here though. Wouldn=92t that = help when a long-lived structure was single large block but, in this = case, the long-lived structure is a tree composed of many small = heap-allocated blocks and, therefore, they would undergo the same = wasteful =93allocate in young only to be copied to old=94 pathological = behaviour? There is no "young" and no "old" in this scheme. There are two different = heaps, one for large objects, one for small (probably 2-8k max object = size, so not really small in the sense of OCaml). The small area is = managed by Immix, which avoids copying of long-lived objects if they are = allocated together with other long-lived objects (likely), or if not = evacuates a set of probably related objects to a single chunk (this is = somewhat dependent on the evacuation strategy, which will be differnt = for OCaml compared to Java), further improving locality. There are = simple heuristics to ensure that an object is not evacuated too often = (it is already unlikely with the base algorithm), so there will be a lot = less copying. One difficulty remains however: the pause times. It would = probably be necessary to adopt Immix to a (semi-)incremental style to = get the same pause times as with the current GC. Benedikt=