From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 0DF71BC88 for ; Mon, 7 Feb 2005 23:57:44 +0100 (CET) Received: from first.in-berlin.de (dialin-145-254-062-176.arcor-ip.net [145.254.62.176]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j17MvgjZ020102 for ; Mon, 7 Feb 2005 23:57:43 +0100 Received: by first.in-berlin.de (Postfix, from userid 501) id 04652A9A74; Mon, 7 Feb 2005 23:57:42 +0100 (CET) Date: Mon, 7 Feb 2005 23:57:42 +0100 From: Oliver Bandel To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] [Benchmark] NBody Message-ID: <20050207225742.GA473@first.in-berlin.de> References: <4207C9D7.6000804@yahoo.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4207C9D7.6000804@yahoo.fr> User-Agent: Mutt/1.5.6i X-Miltered: at nez-perce with ID 4207F266.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; oliver:01 bandel:01 oliver:01 in-berlin:01 caml-list:01 wrote:01 christophe:01 troestler:01 wrote:01 ocamlopt:01 -inline:01 -unsafe:01 -inline:01 gcc:01 inlining: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, Feb 07, 2005 at 09:04:39PM +0100, sejourne_kevin wrote: > Martin Jambon a écrit : > >On Mon, 7 Feb 2005, Christophe TROESTLER wrote: > > > > > >>Hi, > >> > >>For fun I have implemented an nbody simulation following > >>http://shootout.alioth.debian.org/benchmark.php?test=nbody&lang=all&sort=cpu > >>(code is attached). I've compiled it with > >> > >> ocamlopt -o nbody.com -inline 3 -unsafe -ccopt -O2 nbody.ml > > > > > >-inline 100 gives better results for me (around -25%) > >This should be enough to beat Java :-p if you get the same improvement on > >your side. > Same for me, but "-ccopt -O2" don't change anything. If using gcc, you have to use -O3 to enable inlining. If using only -O2, inlining is not enabled automatically by the gcc. Ciao, Oliver