From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 2B66DBCAE for ; Wed, 6 Jul 2005 19:33:31 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j66HXUUJ018745 for ; Wed, 6 Jul 2005 19:33:30 +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 TAA31095 for ; Wed, 6 Jul 2005 19:33:30 +0200 (MET DST) Received: from pih-relay05.plus.net (pih-relay05.plus.net [212.159.14.132]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j66HXTFu004720 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Wed, 6 Jul 2005 19:33:30 +0200 Received: from [80.229.56.224] (helo=chetara) by pih-relay05.plus.net with esmtp (Exim) id 1DqDm3-0007QC-21 for caml-list@inria.fr; Wed, 06 Jul 2005 18:33:27 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: Caml-list Subject: Re: [Caml-list] x86 vs AMD64 OCaml compiler performance Date: Wed, 6 Jul 2005 18:31:51 +0100 User-Agent: KMail/1.7.2 References: <200507060353.29648.jon@ffconsultancy.com> <42CC11E8.8040505@rftp.com> In-Reply-To: <42CC11E8.8040505@rftp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200507061831.51964.jon@ffconsultancy.com> X-Miltered: at nez-perce with ID 42CC15EA.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 42CC15E9.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 compiler:01 byte:01 compilation:01 compilation:01 byte:01 vastly:01 compilers:01 ocamlc:01 ocamlopt:01 compilers:01 ...:98 1800:98 frog:98 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 Wednesday 06 July 2005 18:16, you wrote: > Jon Harrop wrote: > > I just timed recompilation of my latest project to both byte code and > > native code on both 900MHz Athlon t-bird and 800MHz Athlon64. To my > > suprise, compilation to native code takes roughly the same amount of time > > on both computers but compilation to byte code is slightly faster (1m18 > > vs 1m40) on x86 but vastly faster (21s vs 1m50) on AMD64. > > Ummm... do you mean "1800MHz" or "1.8GHz" for the Athlon64? :) No, I got that bit right - 800MHz (downclocked for the muggy summer). Running at 1.8GHz it compiles in 9s but overheats and switches off after a few minutes, especially when the GPU is working like a Trojan. With compilers compiled to native code I now get: ocamlc ocamlopt 800MHz AMD64 18s 24s 1.8GHz AMD64 9s 12s 900MHz Athlon 27s 34s I'd have expected the compilers to be doing mostly tree manipulation so I was expecting the AMD64 to perform poorly, as the tree-intensive Set.union was the only benchmark where my AMD64 was slower in 64-bit mode than in 32-bit mode. In fact, the AMD64 is no slouch. The vast majority of the time is spent compiling only a few of the source files. Four of them are autogenerated and just contain 300kB of data each, so it's no surprise those are slow. The other is my implementation of a scene graph. Although it is very elegant and actually works very well, many of the types are half a page long, so my guess is that the time is spent in the type system there. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. Technical Presentation Software http://www.ffconsultancy.com/products/presenta