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 48EBBBB91 for ; Sat, 15 Jan 2005 18:02:32 +0100 (CET) Received: from hedwig1.umh.ac.be (hedwig2.umh.ac.be [193.190.193.73]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j0FH2V8N008447 for ; Sat, 15 Jan 2005 18:02:32 +0100 Received: from abel.swapping.umh.ac.be (mail@abel.swapping.umh.ac.be [10.102.100.24]) by hedwig1.umh.ac.be (8.13.1/8.13.1) with ESMTP id j0FH50Od565294; Sat, 15 Jan 2005 18:05:08 +0100 Received: from abel.swapping.umh.ac.be ([127.0.0.1] helo=localhost ident=trch) by abel.swapping.umh.ac.be with esmtp (Exim 3.36 #1 (Debian)) id 1CprJ1-0008OZ-00; Sat, 15 Jan 2005 18:01:43 +0100 Date: Sat, 15 Jan 2005 18:01:41 +0100 (CET) Message-Id: <20050115.180141.123198241.Christophe.Troestler@umh.ac.be> To: Xavier Leroy Cc: farr@mit.edu, shootout-list@lists.alioth.debian.org, caml-list@yquem.inria.fr Subject: Re: [Caml-list] [FP performance] Ocaml sums the harmonic series From: Christophe TROESTLER In-Reply-To: <20050115115519.GA11037@yquem.inria.fr> References: <3D3A6BF5-657B-11D9-A551-000393A34E82@mit.edu> <20050115115519.GA11037@yquem.inria.fr> Organization: Universite de Mons-Hainaut (http://math.umh.ac.be/an/) X-Spook: keyhole TELINT MILSATCOM explosion $400 million in gold bullion Ortega Vince Foster Freeh bemd Blowfish 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.1 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.1 (www dot roaringpenguin dot com slash mimedefang) X-Miltered: at concorde with ID 41E94CA7.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 christophe:01 troestler:01 christophe:01 troestler:01 umh:01 wrote:01 ocamlopt:01 unboxed:01 ocamlopt:01 hack:03 ugly:03 chris:05 inria:05 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=none autolearn=disabled version=3.0.0 X-Spam-Level: On Sat, 15 Jan 2005, Xavier Leroy wrote: > > !sum +. 0.0;; > > The + 0.0 at the end is ugly but convinces ocamlopt that !sum is > best kept unboxed during the loop. Since it always has a positive impact (at least w.r.t. the program without it), would it be possible for ocamlopt to be convinced that it is a good thing without having to write such a hack? Or are there reasons why it is difficult to do? Best regards, ChriS