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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id D7A63BC57 for ; Sun, 28 Nov 2010 15:29:11 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvIBADf28UzRVde0kGdsb2JhbACVCI15CBUBAQEBCQkMBxEDH6dwi3wBBYx4AQSFRw X-IronPort-AV: E=Sophos;i="4.59,270,1288566000"; d="scan'208";a="81110633" Received: from mail-ey0-f180.google.com ([209.85.215.180]) by mail2-smtp-roc.national.inria.fr with ESMTP; 28 Nov 2010 15:29:11 +0100 Received: by eyf18 with SMTP id 18so1425125eyf.39 for ; Sun, 28 Nov 2010 06:29:11 -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=hoJ4QT11lgcnKW5yK1SlrKsFd9plnyQkE3wm3cxkXFc=; b=kq5UfoQIdlGCIxKf07530455BmYdV5h4XkcbizGit8SxPPnkA2oOTIoWtK3Riu4rME wADeS/Lhls2l/XPoW+vpor3zEfBGO5Co1PSywQ7sqvDkCKPKSzS4iB8foR6/dt3I/DjK wmgWFKGrrxm5cqis5VNCiJ7b+NZzEz+BNA/GI= 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=pLSfEFkFAIMT2RtrMXl5jkwKHd/FGGuFEQ2uu1ouXb7lqEYvomV0ysdC1UgbrWe2MT 9N2DYUtl9dJm7TGWJS7o66cuSmMZ2jl2WM/6sjsVSi9190kDBPzcMEG14igVfsQb7Ao8 s9jxYBjyu2iF3nRyJATh1zoDA+ZJqLiTuDkp4= Received: by 10.14.48.78 with SMTP id u54mr3342570eeb.8.1290954551029; Sun, 28 Nov 2010 06:29:11 -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 x54sm4057318eeh.5.2010.11.28.06.29.09 (version=SSLv3 cipher=RC4-MD5); Sun, 28 Nov 2010 06:29:10 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1081) Subject: Re: [Caml-list] OCaml GC [was Is OCaml fast?] From: Benedikt Meurer In-Reply-To: <4CF25878.4060202@univ-savoie.fr> Date: Sun, 28 Nov 2010 15:29:08 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: 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> To: caml-list@yquem.inria.fr X-Mailer: Apple Mail (2.1081) X-Spam: no; 0.00; ocaml:01 ocaml:01 generational:01 generations:01 locality:01 doable:01 vars:01 psu:98 garbage:01 incompatible:01 incompatible:01 heap:01 heap:01 caml-list:01 tls:01 Speaking of the OCaml GC in general, wouldn't it make sense to replace = the current generational collector with a collector framework that = requires less copying in the common case. For example, dividing the heap = into two parts, "large object space" and "small object space", where LOS = is managed by mark-sweep/mark-compact (could use the current major heap) = and SOS is managed by a recent mark-copy/mark-region collector (Immix = [1] comes to mind here). That way objects would no longer need to be = copied between generations, and using Immix may also reduce cache misses = and improve locality of small/medium sized objects (with proper = evacuation heuristics). This should be doable with a moderate amount of = work, and should require no incompatible changes, while opening the door = for concurrent/parallel garbage collection (this would require = incompatible changes then, replacing caml_young_ptr/caml_young_limit = with TLS vars, etc.). Benedikt [1] http://citeseerx.ist.psu.edu/viewdoc/summary?doi=3D10.1.1.144.3640=