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-04 (06:22)
From: Florian Hars <hars@b...>
Subject: Re: [Caml-list] Re: Mini ray tracer
Julian Brown wrote:
>> Re:
>   http://www.ffconsultancy.com/free/ray_tracer/comparison.html
> Interesting results, but it's kind of unfair to leave optimisation turned
> off for g++! 

I did some comparisions (the ml code on that page doesn't compile, but the
fix is trivial) and told gcc 3.3.5 to actually optimize the c++ (-O2 
-march=x86-64 -msse2 -ffast-math) and the c++ was consistently faster than the 
ocaml code for detail levels of 4 and greater, marginally at 4, about 20% at a 
level of 10, twice as fast at 12, and infinitely faster at a level of 14 (the 
c++ program finished in less than three minutes, the ocaml program started to 
trigger the oom killer after about an hour, and I finally had to push the 
friendly red button labeled "reset" to get my computer back).

This looks like a suboptimal example for the speed of ocaml.

Yours, Florian.