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 623D3BB81 for ; Mon, 26 Sep 2005 19:04:49 +0200 (CEST) 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 j8QH4lj5011469 for ; Mon, 26 Sep 2005 19:04:47 +0200 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 TAA11626 for ; Mon, 26 Sep 2005 19:04:47 +0200 (MET DST) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.206]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j8QH4kqq011463 for ; Mon, 26 Sep 2005 19:04:46 +0200 Received: by xproxy.gmail.com with SMTP id i27so496576wxd for ; Mon, 26 Sep 2005 10:04:46 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=GWGgFUIOoenQENIkjPMiOaA0QV2e0FKNcLRLdffMt8CHxo6DxOv03TI58BNe+Mj+ap7II9mF6Q1dhvlmSGVwAKel0VCyIYmXARqFTlxRHkDnLKt1z0v/Nc+KBYw+D7ExqlLmdvt9jHvehvxlHSF2BDHoR/B9fkPija+xlxDxOq4= Received: by 10.70.21.19 with SMTP id 19mr2354424wxu; Mon, 26 Sep 2005 10:04:46 -0700 (PDT) Received: by 10.70.14.11 with HTTP; Mon, 26 Sep 2005 10:04:46 -0700 (PDT) Message-ID: Date: Mon, 26 Sep 2005 11:04:46 -0600 From: Mackenzie Straight Reply-To: Mackenzie Straight To: Brian Hurt Subject: Re: Ant: [Caml-list] Efficiency of let/and Cc: Martin Chabr , caml-list@inria.fr In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050926043240.24009.qmail@web26809.mail.ukl.yahoo.com> X-Miltered: at nez-perce with ID 43382A2F.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 43382A2E.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 semantically:01 ocamlopt:01 compiler:01 syntax:01 ocaml:01 foo:01 foo:01 toploop:01 val:01 toploop:01 val:01 wrote:01 int:01 int:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 On 9/26/05, Brian Hurt wrote: > Syntactically and semantically there is no difference. I was wondering i= f > the ocamlopt compiler took advatange of the implicit paralellism at all. In any case, it makes (as far as I know) no difference which syntax you use= : % ocaml -drawlambda Objective Caml version 3.08.3 # let foo a1 a2 =3D let l1 =3D Array.length a1 and l2 =3D Array.length a2 i= n l1+l2;; (let (foo/65 (function a1/66 a2/67 (let (l1/68 (array.length a1/66) l2/69 (array.length a2/67)) (+ l1/68 l2/69)))) (apply (field 1 (global Toploop!)) "foo" foo/65)) val foo : 'a array -> 'b array -> int =3D # let bar a1 a2 =3D let l1 =3D Array.length a1 in let l2 =3D Array.length a= 2 in l1+l2;; (let (bar/70 (function a1/71 a2/72 (let (l1/73 (array.length a1/71) l2/74 (array.length a2/72)) (+ l1/73 l2/74)))) (apply (field 1 (global Toploop!)) "bar" bar/70)) val bar : 'a array -> 'b array -> int =3D