From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 032187F7C2 for ; Tue, 4 Feb 2014 11:20:35 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of goswin-v-b@web.de) identity=pra; client-ip=212.227.15.3; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="goswin-v-b@web.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of goswin-v-b@web.de) identity=mailfrom; client-ip=212.227.15.3; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="goswin-v-b@web.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mout.web.de) identity=helo; client-ip=212.227.15.3; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="postmaster@mout.web.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgsCALi98FLU4w8DnGdsb2JhbABZvGGFUoEJFg4BAQEBAQYNCQkUKIIlAQEFOk8LGAklDwUoiCQBGMQzH4lrF458FoMOgRQElEKDZ4YyEo8M X-IPAS-Result: AgsCALi98FLU4w8DnGdsb2JhbABZvGGFUoEJFg4BAQEBAQYNCQkUKIIlAQEFOk8LGAklDwUoiCQBGMQzH4lrF458FoMOgRQElEKDZ4YyEo8M X-IronPort-AV: E=Sophos;i="4.95,778,1384297200"; d="scan'208";a="56772737" Received: from mout.web.de ([212.227.15.3]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 04 Feb 2014 11:20:34 +0100 Received: from frosties.localnet ([37.49.32.119]) by smtp.web.de (mrweb001) with ESMTPSA (Nemesis) id 0MeBVG-1VsW8S0Ac2-00PtZ7 for ; Tue, 04 Feb 2014 11:20:34 +0100 Received: from mrvn by frosties.localnet with local (Exim 4.80) (envelope-from ) id 1WAd7J-0004FI-Hb for caml-list@inria.fr; Tue, 04 Feb 2014 11:20:33 +0100 Date: Tue, 4 Feb 2014 11:20:33 +0100 From: Goswin von Brederlow To: caml-list@inria.fr Message-ID: <20140204102033.GA16281@frosties> References: <52F0455E.5040806@riken.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52F0455E.5040806@riken.jp> User-Agent: Mutt/1.5.21 (2010-09-15) X-Provags-ID: V03:K0:fRGS1r9DiySMejX08lO52+Qe67ipCB+yExR+T0UT83smnCh0ZUc PSnTDCrMvdxcPqzlh5+h1U/kJGhzVJ4c33zWiFKdgiL9cbXXzltY4n5XaAIVCjOU4SoMBSr GMAqwJwFpAItilygNzsEcsATIxF9f/Nxgvwd8OVce/FuPLOfN0GIPqnJDm25TW8dq9jXO6f yQh5tpTRw5Apx6RqCJyjA== Subject: Re: [Caml-list] is there a runtime cost for this On Tue, Feb 04, 2014 at 10:41:50AM +0900, Francois Berenger wrote: > Hello, > > In a .ml file I'd like to write something like this > in order to factorize some code: > > let f x y z = [...] some code [...] > > module Something = struct > let g = f > end > > module Something_else = struct > let h = f > end > > Is calling Something.g or Something_else.h as efficient > as calling f directly? I would expect this to result in identical code. But you know, you could just compile both versions, objdump -d and compare the two results. MfG Goswin