caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Markus Mottl <markus.mottl@gmail.com>
To: Yotam Barnoy <yotambarnoy@gmail.com>
Cc: Ocaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] Expanding the Float Array tag
Date: Mon, 16 Sep 2013 13:14:29 -0400	[thread overview]
Message-ID: <CAP_800qfQeJfO0OZHGo87OOy1rWzbNYnEihqeh5S2My4L0TJsg@mail.gmail.com> (raw)
In-Reply-To: <CAN6ygOnHevF8KCDQ2tM-y2LpV20U9CivhVcDXTwiXeKaR91aKg@mail.gmail.com>

On Mon, Sep 16, 2013 at 12:49 PM, Yotam Barnoy <yotambarnoy@gmail.com> wrote:
> Why do doubles need special handling though, even on a 32-bit system? My
> suggestion is that the Double_tag be changed to Flat_tag, meaning that all
> non-pointer objects can reside in this tag. The only issue I've found so far
> is that polymorphic <, <=, > and >= would not work. However, these operators
> should not be allowed on a vector anyway since there is no natural ordering
> scheme for vectors. If there are other issues, please let me know.

Here is a problem: If you marshal a float array on a 64-bit platform,
how is the 32-bit platform supposed to know about the "logical" and
"physical" size of the array?  On 64-bit platforms where everything is
the same size the distinction wouldn't matter, of course, but on
32-bit it does.  The header word can only provide one size (but tag
distinctions).

> I agree regarding the expansion of 246 constructors. This must have been
> kept for compatibility with 32 bit systems. I think what should happen in 32
> bit systems is that one constructor should be reserved for having >246
> constructors, in which case another word of memory could be utilized for the
> constructor code. In fact, you'd only need to use that extra word if the
> particular constructor exceeds 246.

Appending such a "long" constructor to the end of the block is
probably doable with acceptable complexity.  In that position it
should not require many changes elsewhere in the runtime system or
code generators.  On 64-bit platforms I'd still prefer seeing a change
of the header field layout for efficiency reasons even though this
would likely make a lot of "marshal" users cry and maybe require more
effort to implement.  But I wouldn't mind just using "extended" blocks
with the current header layout there, too, if this made everybody
happy.

Regards,
Markus

-- 
Markus Mottl        http://www.ocaml.info        markus.mottl@gmail.com

  reply	other threads:[~2013-09-16 17:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-16 15:26 Yotam Barnoy
2013-09-16 16:29 ` Markus Mottl
2013-09-16 16:49   ` Yotam Barnoy
2013-09-16 17:14     ` Markus Mottl [this message]
2013-09-16 19:09       ` Yotam Barnoy
2013-09-17  0:31         ` Yotam Barnoy
2013-09-19  9:40     ` Goswin von Brederlow
2013-09-17  9:32 ` Gerd Stolpmann
2013-09-18 15:10   ` Yotam Barnoy
2013-09-19  6:18     ` oleg
2013-09-19  9:47       ` Goswin von Brederlow
2013-09-19 10:10     ` Goswin von Brederlow
2013-09-20  2:18       ` Yotam Barnoy
2013-09-20  6:25         ` Goswin von Brederlow

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=CAP_800qfQeJfO0OZHGo87OOy1rWzbNYnEihqeh5S2My4L0TJsg@mail.gmail.com \
    --to=markus.mottl@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=yotambarnoy@gmail.com \
    /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).