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.2 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 1EB51BC69 for ; Fri, 1 Jun 2007 18:25:13 +0200 (CEST) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.233]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l51GPB5s027537 for ; Fri, 1 Jun 2007 18:25:12 +0200 Received: by nz-out-0506.google.com with SMTP id s1so490659nze for ; Fri, 01 Jun 2007 09:25:11 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=oMb6TQYhocD8Or0Zx/u5OdErnNkYMTkyZuq40DA5osb9z7TMe6xUVOIq1u2BLgKm9QZIYMkJp1KSLSKYgkZwc4WVvyYEw1xGqUZwIfaJ4+iILmNba8CxmRfowGKlfBpOscTbp4mqcKvhcEDPBklGGBOezzW0bJxVxFyjhBRL4zY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=MQxQXeDACcn6JHHcamQ4EsSJ1Fj2fYEb7rjRf8JHQ9dQMQS69qsIfvwjol0rl1fzznybs8i+FX9JGjlmgRRf6BazC950E9SUp6upHNuFfWP90UR+Yla7JVtxau4oaKQNME1SKK6gWpFDO7l2kcqrD4i1o/xrJ3MIkyCmn8EumBI= Received: by 10.142.73.8 with SMTP id v8mr95582wfa.1180715111272; Fri, 01 Jun 2007 09:25:11 -0700 (PDT) Received: by 10.142.255.12 with HTTP; Fri, 1 Jun 2007 09:25:11 -0700 (PDT) Message-ID: Date: Fri, 1 Jun 2007 12:25:11 -0400 From: "Markus Mottl" To: "Brian Hurt" Subject: Re: [Caml-list] Comparison of OCaml and MLton for numerics Cc: "Alain Frisch" , caml-list@yquem.inria.fr In-Reply-To: <46604214.8020408@janestcapital.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5195a210705302250u6a9e5adey4ed857480f9e5cd8@mail.gmail.com> <891bd3390706010429g2ac722bfmc6932b15393a62b9@mail.gmail.com> <20070601214326.e0a939a6.mle+ocaml@mega-nerd.com> <200706011258.59177.jon@ffconsultancy.com> <604682010706010718x42221e8rde56317905f5c972@mail.gmail.com> <466033EC.3050909@janestcapital.com> <46603DFE.7020406@inria.fr> <46604214.8020408@janestcapital.com> X-j-chkmail-Score: MSGID : 46604867.001 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 46604867.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; markus:01 mottl:01 markus:01 mottl:01 ocaml:01 inlining:01 skipping:01 inlining:01 ocaml:01 wrote:01 caml-list:01 generally:03 comparison:04 brian:04 branches:06 On 6/1/07, Brian Hurt wrote: > But that was my point- if the only thing you're > getting out of inlining a function is skipping a function call (to a known > location), then inlining generally isn't worth it- it's only worth it if it > opens up other possibilities. I disagree. Function calls can be pretty darn expensive. If you have a function that does not much more than branch on some value (many branches, the first discriminated cases being taken more often than others), then the function call alone may costs more than the operation in average, but inlining would still lead to a lot of text being duplicated. Regards, Markus -- Markus Mottl http://www.ocaml.info markus.mottl@gmail.com