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 2D346BB81 for ; Mon, 26 Sep 2005 15:22:03 +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 j8QDM2kY019596 for ; Mon, 26 Sep 2005 15:22:02 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA07651 for ; Mon, 26 Sep 2005 15:22:02 +0200 (MET DST) Received: from cenn.mc.mpls.visi.com (cenn.mc.mpls.visi.com [208.42.156.9]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j8QDM16o024435 for ; Mon, 26 Sep 2005 15:22:02 +0200 Received: from [192.168.42.2] (bhurt.dsl.visi.com [208.42.141.66]) by cenn.mc.mpls.visi.com (Postfix) with ESMTP id 9CB94827C; Mon, 26 Sep 2005 08:22:00 -0500 (CDT) Date: Mon, 26 Sep 2005 08:22:20 -0500 (CDT) From: Brian Hurt X-X-Sender: bhurt@localhost.localdomain To: Martin Chabr Cc: caml-list@inria.fr Subject: Re: Ant: [Caml-list] Efficiency of let/and In-Reply-To: <20050926043240.24009.qmail@web26809.mail.ukl.yahoo.com> Message-ID: References: <20050926043240.24009.qmail@web26809.mail.ukl.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Miltered: at nez-perce with ID 4337F5FA.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 4337F5F9.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 foo:01 arrays:01 semantically:01 ocamlopt:01 compiler:01 2005,:98 ...:98 ...:98 wrote:01 int:01 semantic:02 len:02 len:02 dependent:02 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=none autolearn=disabled version=3.0.3 On Mon, 26 Sep 2005, Martin Chabr wrote: > As it appears to me, there is no semantic difference > between both alternatives. It can be shown with two > dependent expressions y = 1 and z = y + 2: > > # let y = 1 in > let z = y + 2 in > z;; > - : int = 3 Actually, my example would be more like: let y = 1 in let z = 2 in ... vr.s let y = 1 and z = 2 in ... Or, more commonly, something like: let foo arr1 arr2 = (* I need the lengths of both arrays *) let len1 = Array.length arr1 and len2 = Array.length arr2 in ... Syntactically and semantically there is no difference. I was wondering if the ocamlopt compiler took advatange of the implicit paralellism at all. Brian