From: Mackenzie Straight <eizneckam@gmail.com>
To: Brian Hurt <bhurt@spnz.org>
Cc: Martin Chabr <martin_chabr@yahoo.de>, caml-list@inria.fr
Subject: Re: Ant: [Caml-list] Efficiency of let/and
Date: Mon, 26 Sep 2005 11:04:46 -0600 [thread overview]
Message-ID: <a7af8152050926100461430c50@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.63.0509260819410.9226@localhost.localdomain>
On 9/26/05, Brian Hurt <bhurt@spnz.org> wrote:
> Syntactically and semantically there is no difference. I was wondering if
> 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 = let l1 = Array.length a1 and l2 = Array.length a2 in 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 = <fun>
# let bar a1 a2 = let l1 = Array.length a1 in let l2 = Array.length a2
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 = <fun>
next prev parent reply other threads:[~2005-09-26 17:04 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-25 13:31 Brian Hurt
2005-09-25 14:47 ` [Caml-list] " Jon Harrop
2005-09-26 4:32 ` Ant: " Martin Chabr
2005-09-26 5:24 ` Fernando Alegre
2005-09-26 5:56 ` William Lovas
2005-09-26 7:17 ` Bill Wood
2005-09-26 20:59 ` Ant: " Martin Chabr
2005-09-26 13:22 ` Brian Hurt
2005-09-26 16:05 ` Ant: " Stefan Monnier
2005-09-26 16:30 ` [Caml-list] " Brian Hurt
2005-09-27 5:52 ` skaller
2005-09-27 13:06 ` Brian Hurt
2005-09-27 13:24 ` Alan Falloon
2005-09-27 15:24 ` Stefan Monnier
2005-09-27 16:11 ` Brian Hurt
2005-09-27 5:32 ` skaller
2005-09-27 15:21 ` Stefan Monnier
2005-09-26 17:04 ` Mackenzie Straight [this message]
2005-09-26 17:05 ` Ant: [Caml-list] " Marius Nita
2005-09-26 17:36 ` David McClain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a7af8152050926100461430c50@mail.gmail.com \
--to=eizneckam@gmail.com \
--cc=bhurt@spnz.org \
--cc=caml-list@inria.fr \
--cc=martin_chabr@yahoo.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox