caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jon Harrop <jon@ffconsultancy.com>
To: Richard Jones <rich@annexia.org>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Int32 and boxing
Date: Wed, 15 Aug 2007 07:48:31 +0100	[thread overview]
Message-ID: <200708150748.32157.jon@ffconsultancy.com> (raw)
In-Reply-To: <20070813175501.GA24394@furbychan.cocan.org>

On Monday 13 August 2007 18:55:01 Richard Jones wrote:
> I deal a lot with int32 and int64 types when interfacing with other
> languages, so this causes an annoyance.  I'm not sure what the
> implications would be of having a different representation on 32 and
> 64 bit machines.  I guess Marshal would have to go through hoops for a
> start.

Now that I think about it in more detail, this would probably require deeper 
compiler changes than I had thought. You wouldn't need to alter the run-time 
but you'd need to emit different load and store code for unboxed float32s, 
tagging and untagging them, and do arithmetic in 32-bit registers.

I'm not sure Marshal would need changing though. The representation would be 
embedded in nativeint so it would just be a type difference.

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
OCaml for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists/?e


      reply	other threads:[~2007-08-15  6:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-13  4:08 Jon Harrop
2007-08-13 17:55 ` [Caml-list] " Richard Jones
2007-08-15  6:48   ` Jon Harrop [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=200708150748.32157.jon@ffconsultancy.com \
    --to=jon@ffconsultancy.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=rich@annexia.org \
    /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).