Browse thread
[Benchmark] NBody
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2005-02-08 (01:29) |
From: | skaller <skaller@u...> |
Subject: | Re: [Caml-list] [Benchmark] NBody |
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