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=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 49F1BBC69 for ; Tue, 26 Jun 2007 01:59:30 +0200 (CEST) Received: from sccmmhc91.asp.att.net (sccmmhc91.asp.att.net [204.127.203.211]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5PNxTJ9005593 for ; Tue, 26 Jun 2007 01:59:29 +0200 Received: from [192.168.0.104] (12-208-242-210.client.mchsi.com[12.208.242.210]) by sccmmhc91.asp.att.net (sccmmhc91) with SMTP id <20070625235928m9100d3bhle>; Mon, 25 Jun 2007 23:59:28 +0000 In-Reply-To: <200706251307.16487.jon@ffconsultancy.com> References: <467E8A6E.9050700@menta.net> <200706250425.28516.jon@ffconsultancy.com> <467FA3F8.2030601@lix.polytechnique.fr> <200706251307.16487.jon@ffconsultancy.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <01BF21CB-3772-4642-8EA7-C18DA5A8F712@valdosta.edu> Cc: caml-list@yquem.inria.fr Content-Transfer-Encoding: 7bit From: Jonathan Bryant Subject: Re: [Caml-list] Execution time of class versus record Date: Mon, 25 Jun 2007 19:59:04 -0400 To: Jon Harrop X-Mailer: Apple Mail (2.752.3) X-Miltered: at discorde with ID 468056E1.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; unboxed:01 afaik:01 2007,:98 wrote:01 partial:01 caml-list:01 pair:01 int:01 int:01 latter:03 pattern:04 matching:05 identical:07 boxing:08 jun:09 On Jun 25, 2007, at 8:07 AM, Jon Harrop wrote: > > For the same reason, there is a difference between: > > type t = A of int * int > > and: > > type t = A of (int * int) > > The former is unboxed and the latter is boxed (a reference to a > pair). The > boxing can degrade performance (it can also improve performance!). I've always been a little curious about this. Is performance the _only_ reason for this distinction? Construction and pattern matching on the two are identical, and AFAIK neither doesn't allow partial application. --Jonathan