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 833A6BC8E for ; Wed, 4 May 2005 08:22:36 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j446MaBj024579 for ; Wed, 4 May 2005 08:22:36 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id IAA11352 for ; Wed, 4 May 2005 08:22:35 +0200 (MET DST) Received: from grisu.bik-gmbh.de (grisu.bik-gmbh.de [217.110.154.194]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j446MYwX024574 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 4 May 2005 08:22:35 +0200 Received: from [192.168.125.193] (prony.bik-gmbh.de [192.168.125.193]) by grisu.bik-gmbh.de (8.13.1/8.13.1) with ESMTP id j446MTLI095020; Wed, 4 May 2005 08:22:29 +0200 (CEST). Message-ID: <42786A96.3030204@bik-gmbh.de> Date: Wed, 04 May 2005 08:24:22 +0200 From: Florian Hars User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.3) Gecko/20040924 Debian/1.7.3-1ubuntu1 X-Accept-Language: en MIME-Version: 1.0 To: caml-list@inria.fr Cc: jon@ffconsultancy.com Subject: Re: [Caml-list] Re: Mini ray tracer References: <200504281037.46186.jon@ffconsultancy.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 42786A2C.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 42786A2A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; florian:01 hars:01 hars:01 bik-gmbh:01 caml-list:01 tracer:01 tracer:01 trivial:01 gcc:01 ocaml:01 ocaml:01 suboptimal:01 florian:01 wrote:01 compile:01 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: 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.