From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 81175BC69 for ; Wed, 4 Jul 2007 16:24:25 +0200 (CEST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l64EOPuE030013 for ; Wed, 4 Jul 2007 16:24:25 +0200 Received: by ug-out-1314.google.com with SMTP id o2so281720uge for ; Wed, 04 Jul 2007 07:24:24 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=IVcxa26YrH5maEZqUBQBcMb13O8ctt4c50LO0sgfaNcws1uFiPWSDS2X8I5doUh7BZW8eXP2d830JOOMxvpR8QrcCqVvED92E8kLFw9Qqn+DvlhKbzr4xRBX7t3VN0fshFPlpr8abWumzGsF6JJwAFnnDIcZcE79FhWamjqwONk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=rdqWDEzGHiiHQamM+sBCVMcBOZyf9Is7sJ1NL3fIJ1TVfwQrTiT+nDWdMOgSJ629YvZdJ2mRdW5jdZvShCM5YQy1BtnPpiAsS+js5KBigfUFtZODKhXiXOO2XWi6+TEktfJ1/Dr1Nw7fljCXAjUvUDbKxbNWQu3YjMZOPGquV48= Received: by 10.67.89.6 with SMTP id r6mr1213575ugl.1183559064907; Wed, 04 Jul 2007 07:24:24 -0700 (PDT) Received: from ?192.168.1.35? ( [81.32.170.32]) by mx.google.com with ESMTPS id o24sm100408ugd.2007.07.04.07.24.23 (version=SSLv3 cipher=OTHER); Wed, 04 Jul 2007 07:24:24 -0700 (PDT) In-Reply-To: References: <90BAEAF7-0710-44A3-BB2C-5075A2619371@gmail.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <1E47C897-547E-4B65-8DB8-46228F438C1A@gmail.com> Cc: caml-list@yquem.inria.fr Content-Transfer-Encoding: 7bit From: Joel Reymont Subject: Re: [Caml-list] Which function is consing? Date: Wed, 4 Jul 2007 15:24:15 +0100 To: "Markus E.L." X-Mailer: Apple Mail (2.752.3) X-j-chkmail-Score: MSGID : 468BAD99.000 on discorde : j-chkmail score : XXX : 5/20 1 0.000 -> 3 X-Miltered: at discorde with ID 468BAD99.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; allocates:01 allocations:01 markus:01 afaik:01 inlined:01 ocaml:01 compiler:01 2007,:98 blog:98 garbage:01 wrote:01 caml-list:01 functions:01 constructor:01 lisp:01 What I would like to find out is how much memory each function allocates. I would like to minimize memory allocations as they put pressure on the garbage collector. This type of info is reported for Lisp functions, for example. Thanks, Joel On Jul 4, 2007, at 3:29 PM, Markus E.L. wrote: > I'm not sure I understand what you mean -- but if you're looking for > the function call(s) generated when a::as is compiled: There is no > such function AFAIK: :: is a constructor (like 'Some') not a > function (like (+)) and the construction process is completely > inlined (using > ocaml -dinstr I see a makeblock in this instances, I assume that's > it). > -- http://topdog.cc - EasyLanguage to C# compiler http://wagerlabs.com - Blog