Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Nathaniel Gray <n8gray@gmail.com>
To: skaller@users.sourceforge.net
Cc: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>,
	caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Single-case union types as strong typedefs
Date: Sun, 24 Oct 2004 15:52:58 -0700	[thread overview]
Message-ID: <aee06c9e04102415523009de52@mail.gmail.com> (raw)
In-Reply-To: <1098595127.7584.219.camel@pelican.wigram>

On 24 Oct 2004 15:18:47 +1000, skaller <skaller@users.sourceforge.net> wrote:
> On Sun, 2004-10-24 at 07:24, Nathaniel Gray wrote:
> > On Sat, 23 Oct 2004 12:31:39 +0900 (JST), Jacques Garrigue
> > <garrigue@kurims.kyoto-u.ac.jp> wrote:
> >
> > > Unlucky!
> > > With your example, there is no extra boxing involved.
> > > I.e. (1,3) and Rpos(1,3) and Apos(1,3) all share the same physical
> > > representation (a block with 2 fields).
> > > The problem you describe only occurs when your single constructor has
> > > only one argument.
> >
> > Really??  You're kidding.  That's kind of cool but kind of strange --
> > why does it only optimize for composite types?
> 
> For two arguments, it's a pointer to a pair on the heap.
> For one, its a pointer to a one element tuple on the heap.
> This case might be optimised by replacing the pointer
> with the value stored in that single field, but it isn't.

Right.  As I said in my reply to myself, after thinking for a minute I
figured it out.

-- 
>>>-- Nathaniel Gray -- Caltech Computer Science ------>
>>>-- Mojave Project -- http://mojave.cs.caltech.edu -->

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2004-10-24 22:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-23  1:49 Nathaniel Gray
2004-10-23  3:31 ` Jacques Garrigue
2004-10-23  3:39   ` David Brown
2004-10-23  5:00     ` skaller
2004-10-23 21:49       ` Nathaniel Gray
2004-10-23 21:24   ` Nathaniel Gray
2004-10-23 21:33     ` Nathaniel Gray
2004-10-24  3:00     ` John Prevost
2004-10-24  5:18     ` skaller
2004-10-24 22:52       ` Nathaniel Gray [this message]
2004-10-25 13:21 ` Damien Doligez
2004-10-25 14:25   ` Jacques Carette
2004-10-26 14:07     ` Damien Doligez
2004-10-26 15:05       ` Jacques Carette
2004-10-26 17:34         ` skaller
2004-10-26 20:02           ` [Caml-list] Combined compilation and linking Jon Harrop

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=aee06c9e04102415523009de52@mail.gmail.com \
    --to=n8gray@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=garrigue@kurims.kyoto-u.ac.jp \
    --cc=skaller@users.sourceforge.net \
    /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