From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id F3E16BC8E for ; Wed, 4 May 2005 00:47:31 +0200 (CEST) Received: from pih-relay04.plus.net (pih-relay04.plus.net [212.159.14.131]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j43MlVbu008779 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Wed, 4 May 2005 00:47:31 +0200 Received: from [80.229.56.224] (helo=chetara) by pih-relay04.plus.net with esmtp (Exim) id 1DT6At-0002ds-0H for caml-list@yquem.inria.fr; Tue, 03 May 2005 23:47:31 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Re: Mini ray tracer Date: Tue, 3 May 2005 23:47:15 +0100 User-Agent: KMail/1.7.1 References: <200504281037.46186.jon@ffconsultancy.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200505032347.15897.jon@ffconsultancy.com> X-Miltered: at concorde with ID 4277FF83.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 tracer:01 cpp:01 ocaml:01 ocamlopt:01 ocaml:01 vastly:01 vastly:01 48,:98 frog:98 wrote:01 compile:01 caml:02 guess:02 objective:02 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: On Monday 02 May 2005 20:48, Julian Brown wrote: > Interesting results, but it's kind of unfair to leave optimisation turned > off for g++! What kind of results do you get with, say, -O3 -ffast-math? Sorry, I just misquoted the compile line, which really did have optimisatio= ns=20 on: g++ -O2 -march=3Dathlon-tbird ray.cpp -o ray =2DO3 and -ffast-math make little difference (OCaml is still substantially= =20 faster). =46rom my AMD64 results, it appears that g++ is having the floating point=20 problem that ocamlopt usually has. Specifically, it is producing very poor = =46P=20 performance on x86 but much better on AMD64. Even more curiously, using single precision in the C++ version (which is=20 difficult to do in the OCaml version), the performance is vastly better on= =20 x86 but vastly worse on AMD64?!? My uneducated guess is a float-align probl= em=20 but I haven't really looked into it. =2D-=20 Dr Jon D Harrop, Flying Frog Consultancy Ltd. Objective CAML for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists