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 EB133BC88 for ; Mon, 7 Feb 2005 21:23:03 +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 j17KN3Gn004130 for ; Mon, 7 Feb 2005 21:23:03 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA22670 for ; Mon, 7 Feb 2005 21:23:03 +0100 (MET) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j17KN2ru004126 for ; Mon, 7 Feb 2005 21:23:02 +0100 Received: from frontend2.messagingengine.com (frontend2.internal [10.202.2.151]) by frontend1.messagingengine.com (Postfix) with ESMTP id 511D1C54698; Mon, 7 Feb 2005 15:23:01 -0500 (EST) X-Sasl-enc: iPQapYGwwen4n4aaWSheIg 1107807780 Received: from [172.16.112.115] (burnham.ljcrf.edu [192.231.106.2]) by frontend2.messagingengine.com (Postfix) with ESMTP id BE20A56F785; Mon, 7 Feb 2005 15:22:59 -0500 (EST) Date: Mon, 7 Feb 2005 12:22:55 -0800 (PST) From: Martin Jambon X-X-Sender: martin@localhost To: Christophe TROESTLER Cc: caml-list@inria.fr Subject: Re: [Caml-list] [Benchmark] NBody In-Reply-To: <20050207.204610.93889282.Christophe.Troestler@umh.ac.be> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Miltered: at nez-perce with ID 4207CE27.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 4207CE26.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 christophe:01 troestler:01 wrote:01 wrote:01 christophe:01 troestler:01 ocamlopt:01 -inline:01 -unsafe:01 -inline:01 compilers:01 18%:98 ...:98 slower:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.2 X-Spam-Level: On Mon, 7 Feb 2005, Christophe TROESTLER wrote: > On Mon, 7 Feb 2005, Martin Jambon 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