From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.0 required=5.0 tests=DNS_FROM_SECURITYSAGE autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 83D9CBD2D for ; Mon, 20 Oct 2008 10:03:03 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoDAFut+UjAXQImiGdsb2JhbACKB4lhAQEBFSKsY4Ns X-IronPort-AV: E=Sophos;i="4.33,440,1220220000"; d="scan'208";a="18904970" Received: from discorde.inria.fr ([192.93.2.38]) by mail1-smtp-roc.national.inria.fr with ESMTP; 18 Oct 2008 18:36:39 +0200 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id m9IGac1L016274 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Sat, 18 Oct 2008 18:36:39 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtgBAMet+UhRZ90wmmdsb2JhbACKB4lhAQEBAQEICwoHEQOsYINs X-IronPort-AV: E=Sophos;i="4.33,440,1220220000"; d="scan'208";a="30492750" Received: from mtaout02-winn.ispmail.ntl.com ([81.103.221.48]) by mail4-smtp-sop.national.inria.fr with ESMTP; 18 Oct 2008 18:36:38 +0200 Received: from aamtaout02-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com (InterMail vM.7.05.02.00 201-2174-114-20060621) with ESMTP id <20081018163638.XTJC21103.mtaout02-winn.ispmail.ntl.com@aamtaout02-winn.ispmail.ntl.com>; Sat, 18 Oct 2008 17:36:38 +0100 Received: from romulus.metastack.com ([81.102.132.77]) by aamtaout02-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20081018163637.BLSX21638.aamtaout02-winn.ispmail.ntl.com@romulus.metastack.com>; Sat, 18 Oct 2008 17:36:37 +0100 Received: from countertenor (24.Red-213-97-64.staticIP.rima-tde.net [213.97.64.24]) (authenticated bits=0) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id m9IGaGab006525 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Sat, 18 Oct 2008 17:36:27 +0100 From: "David Allsopp" To: "'Andres Varon'" Cc: "'OCaml Mailing List'" References: <57EBE30ABB324436B98173D41A9473CA@countertenor> <273232B4-E482-4B0A-A4D1-B9B5876FDD60@gmail.com> Subject: RE: [Caml-list] ocamlopt performance in 3.11 Date: Sat, 18 Oct 2008 18:36:09 +0200 Organization: MetaStack Solutions Ltd. Message-ID: <30A4D55DA6F848278426563E47BE9A43@countertenor> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <273232B4-E482-4B0A-A4D1-B9B5876FDD60@gmail.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Thread-Index: AckwVFsRvdkk3XuKTKiRPXgrUUvNpAA6hiwg X-Scanned-By: MIMEDefang 2.64 on 81.102.132.74 X-Cloudmark-Analysis: v=1.0 c=1 a=iyVUTYJXYAQA:10 a=AVPVuL_TmVYA:10 a=ha1_LcNkxhOq1qn_WIAA:9 a=Y-1BTWYiW-VB5Dxv3P7iNlKFmCQA:4 a=kJVaTwQnZmMA:10 X-Miltered: at discorde with ID 48FA1096.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocamlopt:01 runtime:01 ocaml:01 ocaml:01 ocamlopt:01 dynlink:01 cmx:01 -shared:01 calibrate:98 wrote:01 wrote:01 compile:01 compile:01 caml-list:01 functions:01 Andrew Varon wrote: > On Oct 17, 2008, at 5:59 AM, David Allsopp wrote: > > > Pleased to say that I've got my 3 current projects compiled and > > running > > under 3.11+beta1 > > > > Unfortunately for one of the projects, its "reference" run (a > > computationally intensive, repeatable operation the speed of which > > interests > > me) has gone from repeatedly taking ~38 seconds in 3.10.2 to ~46 > > seconds in > > 3.11.0+beta1. The other two projects don't have as easy a way for me > > to > > calibrate speed (they spend most of their time blocked on I/O > > anyway!). > > > > Has anything apart from the linker changed much in the 3.11 code > > generator > > and has anyone else noticed a performance drop in any other programs? > > The Changes list do mention a number of important changes in the > runtime system. Yes, still blushing that I'd failed to check the Changes file first... > For most of my programs the bottleneck functions are implemented in C. > For one of the few cases where OCaml is taking care of the core loop, > ocaml 3.11.0beta1 produce a consistently slower native executable than > 3.10.2 by a very small factor (around 0.5%). I have not timed in > Windows, and I run Windows inside a virtual machine, so I'm not sure > if the differences I will observe there are just an artifact of that > setup. OK, so I've tried using the -nodynlink option with all calls to ocamlopt and spotted *no* timing difference. A quick binary comparison of the EXE produced reveals that ocamlopt -nodynlink is making ABSOLUTELY NO difference in the resulting code. While I can see a benefit to having native code compile for use with dynlink by default, given the performance hit I'm seeing, wouldn't it be better in terms of backwards compatibility if you had to specify, say, -fordynlink in order to compile a .cmx (and, presumably more importantly, .o file) for use with ocamlopt -shared? David