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 31CF0BC8B for ; Sun, 13 Feb 2005 19:15:52 +0100 (CET) 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 j1DIFpHa017629 for ; Sun, 13 Feb 2005 19:15:51 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA12411 for ; Sun, 13 Feb 2005 19:15:49 +0100 (MET) Received: from swip.net (mailfe08.swip.net [212.247.154.225]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j1DIFmBP005121 for ; Sun, 13 Feb 2005 19:15:49 +0100 X-T2-Posting-ID: 2IIuXFmkcTpj3lKEFKW25A== Received: from [83.176.169.131] (HELO poincare) by mailfe08.swip.net (CommuniGate Pro SMTP 4.2.9) with ESMTP id 99297169; Sun, 13 Feb 2005 19:15:46 +0100 Received: from poincare ([127.0.0.1] helo=localhost ident=trch) by poincare with esmtp (Exim 3.36 #1 (Debian)) id 1D0OFm-0003vA-00; Sun, 13 Feb 2005 19:13:54 +0100 Date: Sun, 13 Feb 2005 19:13:53 +0100 (CET) Message-Id: <20050213.191353.47433614.Christophe.Troestler@umh.ac.be> To: "O'Caml Mailing List" Subject: Re: [Caml-list] [Benchmark] NBody From: Christophe TROESTLER In-Reply-To: <20050208104312.GA10035@yquem.inria.fr> References: <20050207.195724.87945401.Christophe.Troestler@umh.ac.be> <20050208104312.GA10035@yquem.inria.fr> Organization: Universite de Mons-Hainaut (http://math.umh.ac.be/an/) X-Spook: bootleg Semtex Khaddafi Juiliett Class Submarine monarchist TWA Project Monarch Peking global Vince Foster X-Blessing: Om Ah Hum Vajra Guru Pema Siddhi Hum X-Operating-System: GNU/Linux (http://www.linux.org/) X-Mailer-URL: http://www.mew.org/ X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 420F9957.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 420F9954.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 christophe:01 troestler:01 christophe:01 troestler:01 umh:01 wrote:01 ocaml:01 unboxing:01 gcc:01 ocaml:01 powerpc:01 slower:01 essentially:01 catching: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: Hi, Sorry for the late reply, I am catching up with email. On Tue, 8 Feb 2005, Xavier Leroy wrote: > > Your OCaml code is about as good as you can write. All the unboxing > optimizations are triggered. Ah, thanks for telling, I was wondering about that. > You don't say which Java implementation you used (there are several). Sorry; Sun JDK 1.5.0. > (Besides, being 1.3 times slower than gcc on numerical code is > within the design envelope for OCaml. My performance goals have > always been "never more than twice as slow as C".) Yes. I am not complaining, just trying to understand (and, to say the whole truth, I was also a bit "sad" that Java was beating my favorite language :). > On a "normal" (register-based) float architecture like PowerPC or > x86_64, the OCaml-generated code is essentially identical to the > gcc-generated one. Oh, good, so going to 64 bits will bring us that too! > The C translation is attached for your amusement. Thanks for your very detailed and informative answer! Best regards, ChriS