English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Mini ray tracer
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-05-03 (22:47)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] Re: Mini ray tracer
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 optimisations 

  g++ -O2 -march=athlon-tbird ray.cpp -o ray

-O3 and -ffast-math make little difference (OCaml is still substantially 

From my AMD64 results, it appears that g++ is having the floating point 
problem that ocamlopt usually has. Specifically, it is producing very poor FP 
performance on x86 but much better on AMD64.

Even more curiously, using single precision in the C++ version (which is 
difficult to do in the OCaml version), the performance is vastly better on 
x86 but vastly worse on AMD64?!? My uneducated guess is a float-align problem 
but I haven't really looked into it.

Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists