Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Benchmark] NBody
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Martin Jambon <martin_jambon@e...>
Subject: Re: [Caml-list] [Benchmark] NBody
On Mon, 7 Feb 2005, Christophe TROESTLER wrote:

> On Mon, 7 Feb 2005, Martin Jambon <martin_jambon@emailuser.net> wrote:
> >
> > On Mon, 7 Feb 2005, Christophe TROESTLER wrote:
> >
> > >   ocamlopt -o nbody.com -inline 3 -unsafe -ccopt -O2 nbody.ml
> >
> > -inline 100 gives better results for me (around -25%)
>
> For me it is slower (about 13-18%).  Are you also on an intel
> platform?

That was on my laptop with an Intel Celeron with Linux (I don't know much
more about the hardware). The results are stable.

I tested the same code on another machine with an Intel Pentium 4, and I
get "discrete" results. I repeat "time prog arg" in the shell
successively and get this:

time ./nbody-inline100 1_000_000
-> either 1.145-1.150 or 1.070-1.090 or sometimes 1.014-1.015

time ./nbody-inline3 1_000_000
-> either 0.990-0.995 or 1.245-1.255

This is an interesting effect... Probably it is well-known by people who
write compilers, personally I don't know anything about this topic. I can
provide more quantitative data on demand.


Martin

--
Martin Jambon, PhD
Researcher in Structural Bioinformatics since the 20th Century
The Burnham Institute http://www.burnham.org
San Diego, California