From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p27AJHIk020315 for ; Mon, 7 Mar 2011 11:19:22 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aj8CAGo/dE3RVaA2i2dsb2JhbACEKKIYCBUBAQEKCwoHDwYho1OJa4JZhDSJCgEBAwWBIoNFdgSMMIhaOoEWgXM X-IronPort-AV: E=Sophos;i="4.62,276,1297033200"; d="scan'208";a="89346417" Received: from mail-pw0-f54.google.com ([209.85.160.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 07 Mar 2011 11:19:21 +0100 Received: by pwj8 with SMTP id 8so1058778pwj.27 for ; Mon, 07 Mar 2011 02:19:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=BAuRIYJzPqZN3TN5WIinAqLBhg8BwncSzeDgw2qnI/A=; b=bHLLKrdohD3cD9Wc2eRgfILPdgMCum361XVeMBHsx9LBIc+GoqAAkvXhu2iuF5DzrS V3zhPaxpJjYXLdETbJ3xZFajLNRWbnSmqEnosUSu+SOVORSyfCFuYkn0WgduA8xMv5Kn oeC65tTWACWXskUt/UCcG2ESfDS3NkJKFd6KY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=dEMm0Etj+B/XRb9AoXFZ8oCVGvLpEUEaHOYDYIz8TsAviB6NAIqlAfjDOd7hIWtw8Y FwzuNBDG/8mIjOgdrbQtQJ0q4PCdmE9hQSqG3FcyFXxx6eMlCRFXj6mk0uV7N97vxf/R CPHrNBQPRmDJGeCohqgT7yOxPr2liJUWRSSVw= MIME-Version: 1.0 Received: by 10.142.144.15 with SMTP id r15mr3121082wfd.371.1299493159149; Mon, 07 Mar 2011 02:19:19 -0800 (PST) Sender: daniel.c.buenzli@gmail.com Received: by 10.142.132.6 with HTTP; Mon, 7 Mar 2011 02:19:19 -0800 (PST) In-Reply-To: References: Date: Mon, 7 Mar 2011 11:19:19 +0100 X-Google-Sender-Auth: ReGqZEK8OYP30WhTj0t9wre-MoU Message-ID: From: =?UTF-8?Q?Daniel_B=C3=BCnzli?= To: Kihong Heo Cc: caml-list@inria.fr Content-Type: text/plain; charset=UTF-8 Subject: Re: [Caml-list] variable sharing Value sharing will not depend on the compiler but on your programing style (and the style of the libraries you use). When you code you should always ask yourself whether you are recycling the values you manipulate or whether you are doing new copies of the same data. You may also be interested in implementing hash consing [1] for your data structures. Best, Daniel [1] http://www.lri.fr/~filliatr/ftp/publis/hash-consing.ps.gz