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=1.3 required=5.0 tests=AWL,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 18DA7BBAF for ; Mon, 20 Oct 2008 14:11:18 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AscCADMS/EjAXQIngWdsb2JhbACKColjAQEWIq0Dg2w X-IronPort-AV: E=Sophos;i="4.33,451,1220220000"; d="scan'208";a="18951764" Received: from concorde.inria.fr ([192.93.2.39]) by mail1-smtp-roc.national.inria.fr with ESMTP; 20 Oct 2008 14:11:17 +0200 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m9KCBB2l029350 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 20 Oct 2008 14:11:17 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtUAAKsS/EhRZ90xkWdsb2JhbACKColjAQEBAQkLCgcRA60Cg2w X-IronPort-AV: E=Sophos;i="4.33,451,1220220000"; d="scan'208";a="30534455" Received: from mtaout03-winn.ispmail.ntl.com ([81.103.221.49]) by mail4-smtp-sop.national.inria.fr with ESMTP; 20 Oct 2008 14:11:16 +0200 Received: from aamtaout03-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.05.02.00 201-2174-114-20060621) with ESMTP id <20081020121115.NMDD10791.mtaout03-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com>; Mon, 20 Oct 2008 13:11:15 +0100 Received: from romulus.metastack.com ([81.102.132.77]) by aamtaout03-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20081020121115.KXDS2093.aamtaout03-winn.ispmail.ntl.com@romulus.metastack.com>; Mon, 20 Oct 2008 13:11:15 +0100 Received: from countertenor ([149.254.192.220]) (authenticated bits=0) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id m9KCBA94014062 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Mon, 20 Oct 2008 13:11:12 +0100 From: "David Allsopp" To: "'Alain'" Cc: "'Andres Varon'" , "'OCaml Mailing List'" References: <57EBE30ABB324436B98173D41A9473CA@countertenor> <273232B4-E482-4B0A-A4D1-B9B5876FDD60@gmail.com> <30A4D55DA6F848278426563E47BE9A43@countertenor> <48FC3E20.2090206@gmail.com> Subject: RE: [Caml-list] ocamlopt performance in 3.11 Date: Mon, 20 Oct 2008 13:11:09 +0100 Organization: MetaStack Solutions Ltd. Message-ID: <02753562463A47AFB9B4C754F45DAAA3@countertenor> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AckyjAP1J5BFFw0dRFSSn76UJBmEZwAIEjWw In-Reply-To: <48FC3E20.2090206@gmail.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 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=k71TRxw9tAfTXJlJJOoA:9 a=JSi8UPww93EFoYLaKz3uYL7H5P4A:4 a=v47ZLdibA2YA:10 X-Miltered: at concorde with ID 48FC7560.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocamlopt:01 frisch:01 ocamlopt:01 makefiles:01 -help:01 dynlink:01 cmx:01 -shared:01 dynlink:01 makefiles:01 masm:01 wrote:01 wrote:01 compile:01 compile:01 Alain Frisch wrote: > David Allsopp wrote: > > 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. > > -nodynlink only makes a difference for the AMD64 backend. It is accepted > by ocamlopt for all ports in order to simplify Makefiles. Ah, I didn't realise that. Perhaps ocamlopt -help could include a note to that effect? > > 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? > > There were reasonable arguments for turning the "ready for dynlink" > behavior on by default, namely that nobody would do it otherwise in the > Makefiles of their distributed libraries since it is required only on > one port. Indeed - that's the benefit I was referring to! However... > Also, according to a few benchmarks, the impact on performance is very > limited. Then why might my program be running ~25% slower when compiled with ocamlopt 3.11.0 vs 3.10.2? I'm assuming that there's little to no difference between ocamlopt using masm and ocamlopt using gas in terms of resulting performance? David