caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christophe Raffalli <christophe.raffalli@univ-savoie.fr>
To: Mike Hamburg <hamburg@fas.harvard.edu>
Cc: caml-list@inria.fr, Charles Martin <chaspost@yahoo.com>
Subject: Re: [Caml-list] unboxing options
Date: Wed, 11 May 2005 20:50:20 +0200	[thread overview]
Message-ID: <428253EC.3090201@univ-savoie.fr> (raw)
In-Reply-To: <e72c14e4f63227fe1c7f448c9761ec5c@fas.harvard.edu>

[-- Attachment #1: Type: text/plain, Size: 1123 bytes --]

Mike Hamburg wrote:
> Why should we need an "unboxed" keyword?  Is there any reason why the
> user should want things to be boxed?

Yes many reason:

- Unboxing of data structure prevent sharing of data structure and
therefore:
   1 it may increase the memory usage
   2 it changes the semantics in presence of mutable data or ==
   3 it cost time to get the data out of the structure (needs copying)

So in fact, you only want unboxing for small object that have little
chance to be shared.

You could correct 2 and 3 if you allow pointer in the middle of the data
structure, but this is a nightmare for GC and runtime ...


--
Christophe Raffalli
Université de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex

tél: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
mail: Christophe.Raffalli@univ-savoie.fr
www: http://www.lama.univ-savoie.fr/~RAFFALLI
---------------------------------------------
IMPORTANT: this mail is signed using PGP/MIME
At least Enigmail/Mozilla, mutt or evolution
can check this signature. The public key is
stored on www.keyserver.net
---------------------------------------------

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

      reply	other threads:[~2005-05-11 18:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-06  3:22 Charles Martin
2005-05-10 18:19 ` [Caml-list] " Christophe Raffalli
2005-05-11 17:18   ` Mike Hamburg
2005-05-11 18:50     ` Christophe Raffalli [this message]

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=428253EC.3090201@univ-savoie.fr \
    --to=christophe.raffalli@univ-savoie.fr \
    --cc=caml-list@inria.fr \
    --cc=chaspost@yahoo.com \
    --cc=hamburg@fas.harvard.edu \
    /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;
as well as URLs for NNTP newsgroup(s).