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 E0881BC32 for ; Thu, 17 Mar 2005 12:11:18 +0100 (CET) Received: from will.iki.fi (will.iki.fi [217.169.64.20]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j2HBBIQC010172 for ; Thu, 17 Mar 2005 12:11:18 +0100 Received: from acerf.exomi.com (fa-3-0-0.fw.exomi.com [217.169.64.99]) by will.iki.fi (Postfix) with ESMTP id B9C4414; Thu, 17 Mar 2005 13:11:13 +0200 (EET) Subject: Re: [Caml-list] OCaml troll on Slashdot From: Ville-Pertti Keinonen To: Jon Harrop Cc: caml-list@yquem.inria.fr In-Reply-To: <200503171031.59483.jon@ffconsultancy.com> References: <20050316001819.GB347@first.in-berlin.de> <200503161951.48923.jon@ffconsultancy.com> <200503171031.59483.jon@ffconsultancy.com> Content-Type: text/plain Date: Thu, 17 Mar 2005 13:11:07 +0200 Message-Id: <1111057867.686.17.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.2.0 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 423965D6.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 recursive:01 compilation:01 ocamlopt:01 recursion:01 wrote:01 wrote:01 binaries:01 binaries:01 tail:01 tail:01 slower:01 slower:01 native: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 Thu, 2005-03-17 at 10:31 +0000, Jon Harrop wrote: > On Thursday 17 March 2005 03:35, brogoff wrote: > > I just ran your counterexample and the tail recursive code was faster > > for each. I used native code compilation. > > That's odd. My previous results were for a 1.2GHz Athlon t-bird, ocamlopt > 3.08. Tail recursion is also significantly slower on an 866MHz P3 (x86 It could be specific to i386 code generation. Tail-recursive is faster for both of your tests on both of the amd64 machines (512/1024k L2 cache sizes) I tried on when using 64-bit binaries but slightly slower for the first case when using 32-bit binaries.