<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2005/05/839576f084d909ebd28f2dd64dbf5018"
  from="Christophe Raffalli &lt;christophe.raffalli@u...&gt;"
  author="Christophe Raffalli"
  date="2005-05-11T18:50:24"
  subject="Re: [Caml-list] unboxing options"
  prev="2005/05/32852c0e9441fd5cacc1b63046dc78af"
  next="2005/05/428d4fa76763d222dd5a06d729908ab9"
  prev-in-thread="2005/05/044060475aa4fbf6c9f1d9f9e4e03e1a"
  prev-thread="2005/05/bc5084b4ee4838f0829f9e1f0d319f39"
  next-thread="2005/05/87479e8242941e44a1b561e930931482"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="unboxing options">
<msg 
  url="2005/05/84b98879bcb504fb728dfba2b6103b66"
  from="Charles Martin &lt;chaspost@y...&gt;"
  author="Charles Martin"
  date="2005-05-06T03:22:59"
  subject="unboxing options">
<msg 
  url="2005/05/58267795e404d23e6686968eacd8d67e"
  from="Christophe Raffalli &lt;christophe.raffalli@u...&gt;"
  author="Christophe Raffalli"
  date="2005-05-10T18:19:14"
  subject="Re: [Caml-list] unboxing options">
<msg 
  url="2005/05/044060475aa4fbf6c9f1d9f9e4e03e1a"
  from="Mike Hamburg &lt;hamburg@f...&gt;"
  author="Mike Hamburg"
  date="2005-05-11T17:19:41"
  subject="Re: [Caml-list] unboxing options">
<msg 
  url="2005/05/839576f084d909ebd28f2dd64dbf5018"
  from="Christophe Raffalli &lt;christophe.raffalli@u...&gt;"
  author="Christophe Raffalli"
  date="2005-05-11T18:50:24"
  subject="Re: [Caml-list] unboxing options">
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>
Mike Hamburg wrote:
&gt; Why should we need an "unboxed" keyword?  Is there any reason why the
&gt; 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
---------------------------------------------

</contents>

</message>

