From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 3C534BC88 for ; Tue, 8 Feb 2005 02:48:29 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j181mSBs004325 for ; Tue, 8 Feb 2005 02:48:28 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id CAA32250 for ; Tue, 8 Feb 2005 02:48:28 +0100 (MET) Received: from biscayne-one-station.mit.edu (BISCAYNE-ONE-STATION.MIT.EDU [18.7.7.80]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j181mQTL019410 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 8 Feb 2005 02:48:27 +0100 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by biscayne-one-station.mit.edu (8.12.4/8.9.2) with ESMTP id j181mP5q016537; Mon, 7 Feb 2005 20:48:25 -0500 (EST) Received: from [18.98.6.119] (WESTGATE-THREE-SEVENTY-FOUR.MIT.EDU [18.98.6.119]) (authenticated bits=0) (User authenticated as farr@ATHENA.MIT.EDU) by outgoing.mit.edu (8.12.4/8.12.4) with ESMTP id j181mH0Z003796 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT); Mon, 7 Feb 2005 20:48:18 -0500 (EST) In-Reply-To: <1107826151.13571.199.camel@pelican.wigram> References: <20050207.195724.87945401.Christophe.Troestler@umh.ac.be> <1107826151.13571.199.camel@pelican.wigram> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <80eb59bd970cd828d562f79e8eb565bf@mit.edu> Content-Transfer-Encoding: 7bit Cc: "O'Caml Mailing List" , Christophe TROESTLER From: "Will M. Farr" Subject: Re: [Caml-list] [Benchmark] NBody Date: Mon, 7 Feb 2005 20:48:16 -0500 To: skaller@users.sourceforge.net X-Mailer: Apple Mail (2.619.2) X-Scanned-By: MIMEDefang 2.42 X-Miltered: at nez-perce with ID 42081A6C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 42081A6B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 wrote:01 christophe:01 troestler:01 wrote:01 mutable:01 mutable:01 ocaml:01 unboxed:01 garbage:01 glebe:01 caml-list:01 beginner's:01 ocaml:01 beginners:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: Doesn't caml store records whose types are all floats as a float array anyway? I thought I remembered this optimization going by in the manual somewhere. Will On 7 Feb 2005, at 8:29 PM, skaller wrote: > On Tue, 2005-02-08 at 05:57, Christophe TROESTLER wrote: > > >> type planet = { >> mutable x : float; mutable y : float; mutable z : float; >> mutable vx: float; mutable vy: float; mutable vz: float; >> mass : float; >> } > > Advice from old FORTRAN hacker: > > This is a bad data structure for Ocaml. > > Try using an unboxed float array of 7 times the length instead, > this will eliminate boxing, eliminate write barriers, > eliminate garbage collection, reduce memory requirements. > > > -- > John Skaller, mailto:skaller@users.sf.net > voice: 061-2-9660-0850, > snail: PO BOX 401 Glebe NSW 2037 Australia > Checkout the Felix programming language http://felix.sf.net > > > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs