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 CE65DBC8D for ; Sat, 15 Jan 2005 16:49:27 +0100 (CET) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.203]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j0FFnRnp000336 for ; Sat, 15 Jan 2005 16:49:27 +0100 Received: by rproxy.gmail.com with SMTP id y7so85707rne for ; Sat, 15 Jan 2005 07:49:26 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=DTGfhTVv6GCKrGHHkCgJsWtN/K8TKWSEHChOxy0xDFkzEoT/nX4+vGIIjdT4A3AUkCcModOhmhLvCEIZ1ZJs2+vJ6l6hAptsbxNTjyvuIydTZz98g+QjqX2/PGv58lSSTFCy+zhJQuXd2+jglsImYJ8wMr5uMoO8VigVhPzhTkk= Received: by 10.38.97.73 with SMTP id u73mr21273rnb; Sat, 15 Jan 2005 07:49:26 -0800 (PST) Received: by 10.38.82.65 with HTTP; Sat, 15 Jan 2005 07:49:26 -0800 (PST) Message-ID: Date: Sat, 15 Jan 2005 16:49:26 +0100 From: Michal Moskal Reply-To: Michal Moskal To: Xavier Leroy Subject: Re: [Caml-list] Ocaml sums the harmonic series -- four ways, four benchmarks: floating point performance Cc: "Will M. Farr" , shootout-list@lists.alioth.debian.org, caml-list@yquem.inria.fr In-Reply-To: <20050115115519.GA11037@yquem.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <3D3A6BF5-657B-11D9-A551-000393A34E82@mit.edu> <20050115115519.GA11037@yquem.inria.fr> X-Miltered: at concorde with ID 41E93B87.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; michal:01 moskal:01 michal:01 moskal:01 caml-list:01 ocaml:01 wrote:01 model:01 compilers:01 ocaml:01 surprising:01 malekith:01 1.5:98 gcs:01 caml:02 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.0 X-Spam-Level: On Sat, 15 Jan 2005 12:55:19 +0100, Xavier Leroy wrote: > As others have mentioned, this strongly depends on the processor > instruction set and even on the processor model. My own benchmarks > (with your Caml code) give the following results: > > PPC G4 (Cube) 1 < 2 < 3 < 4 < 5 speed ratio = 1.5 > Xeon 2.8 3 < 4 < 1 = 2 < 5 speed ratio = 1.02 > Pentium 4 2.0 3 < 1 < 2 < 4 < 5 speed ratio = 1.2 > Athlon XP 1.4 4 < 5 < 3 < 1 < 2 speed ratio = 2.2 I tested it on Athlon 64 3000+ using both 32bit and 64bit compilers, the results: 32bit: 4 = 5 < 3 < 1 = 2, speed ratio 2.2 64bit: 3 < 1 = 2 = 4 < 5, speed ratio 1.15 Difference between 64 and 32 bit version (best cases) is 1.30 (64 is faster). All tests were performed using ocaml 3.07. > The Athlon figures are *very* surprising. It could be the case that > this benchmark falls into a quirk of that (otherwise excellent :-) > processor. So I guess in 32 bit mode it remains the same on newer athlons. -- : Michal Moskal :: http://nemerle.org/~malekith/ :: GCS !tv h e>+++ b++ : No, I will *not* fix your computer............ :: UL++++$ C++ E--- a?