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.1 required=5.0 tests=AWL 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 AADF5BC69 for ; Thu, 31 May 2007 17:35:51 +0200 (CEST) Received: from smtp5-g19.free.fr (smtp5-g19.free.fr [212.27.42.35]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4VFZph8002090 for ; Thu, 31 May 2007 17:35:51 +0200 Received: from Tocksi.local (lns-bzn-60-82-254-250-10.adsl.proxad.net [82.254.250.10]) by smtp5-g19.free.fr (Postfix) with ESMTP id 1A1C6447F2; Thu, 31 May 2007 17:35:50 +0200 (CEST) Message-ID: <465EEB55.2010904@univ-savoie.fr> Date: Thu, 31 May 2007 17:35:49 +0200 From: Christophe Raffalli User-Agent: Thunderbird 2.0.0.0 (Macintosh/20070326) MIME-Version: 1.0 To: Jon Harrop Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Comparison of OCaml and MLton for numerics References: <5195a210705302250u6a9e5adey4ed857480f9e5cd8@mail.gmail.com> <465EE6A6.7050207@univ-savoie.fr> <200705311623.12442.jon@ffconsultancy.com> In-Reply-To: <200705311623.12442.jon@ffconsultancy.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Miltered: at discorde with ID 465EEB57.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; christophe:01 raffalli:01 christophe:01 raffalli:01 univ-savoie:01 ocaml:01 arrays:01 unboxed:01 arrays:01 wrote:01 caml-list:01 int:01 tuple:02 floats:02 comparison:04 Jon Harrop a écrit : > On Thursday 31 May 2007 16:15:50 Christophe Raffalli wrote: > >> Either use array of records (you will have one box), one array of double >> size or two separate arrays (no boxing at all). >> > > That would be good advice were kx and ky both floats but, alas, one is not. So > using a record doesn't buy you anything (only all-float records are unboxed) > and you cannot use a double length array. I tried two arrays and it was > significantly faster. > > Oh, I did not see that kx was an int ... So two records in the only solution (and it is also preferable for MLTon as I imagine that array of tuple are not optimized ...) Christophe Raffalli