From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id E09D5BBBB for ; Wed, 1 Mar 2006 09:35:05 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k218Z5vO001971 for ; Wed, 1 Mar 2006 09:35:05 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA26677 for ; Wed, 1 Mar 2006 09:35:04 +0100 (MET) Received: from mail.barettadeit.com (h213-255-109-130.albacom.net [213.255.109.130] (may be forged)) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k218Z4BQ001959 for ; Wed, 1 Mar 2006 09:35:04 +0100 Received: from [10.1.0.20] (unknown [10.1.0.20]) by mail.barettadeit.com (Postfix) with ESMTP id 38119A6429; Wed, 1 Mar 2006 09:35:59 +0100 (CET) Message-ID: <44055CB2.7060801@studio.baretta.com> Date: Wed, 01 Mar 2006 09:34:58 +0100 From: Alessandro Baretta User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Nathaniel Gray Cc: Ocaml Subject: Re: [Caml-list] Question on performance/style issue References: <43FF2BC9.6030503@studio.baretta.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 44055CB9.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 44055CB8.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; baretta:01 baretta:01 caml-list:01 -inline:01 ocaml:01 ingegneria:98 wrote:01 wrote:01 inline:01 expressions:03 programming:03 alessandro:03 alessandro:03 alex:03 blue:96 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 Nathaniel Gray wrote: > On 2/24/06, Alessandro Baretta wrote: > >> x ++ f ++ g ++ h >> >>What is the impact of the this programming style on execution performance? > > > Looks bad: ... > > So no, it looks like the call to ++ isn't compiled away, at least in > this case. I also tried with -inline 99 and it didn't help, but I > don't know if that's even a valid value for inline. Ah, I thought so much. Yet, I also think I remember that ocaml(c/opt) does reduce some kinds of expressions before code generation. Or am I out in the blue? Alex -- ********************************************************************* Ing. Alessandro Baretta Studio Baretta http://studio.baretta.com/ Consulenza Tecnologica e Ingegneria Industriale Technological Consulting and Industrial Engineering tel. +39 02 370 111 55 fax. +39 02 370 111 54