caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Brian Hurt <bhurt@spnz.org>
To: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Unboxed float tuples
Date: Sun, 8 Nov 2009 14:39:03 -0500 (EST)	[thread overview]
Message-ID: <alpine.DEB.2.00.0911081436090.31905@sergyar> (raw)
In-Reply-To: <91a3da520911080801w6637b652w94a717a830b1c5bd@mail.gmail.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 816 bytes --]



On Mon, 9 Nov 2009, Daniel Bünzli wrote:

> Tuples and records are represented the same way. However when it comes
> to records with only floats fields we get a special unboxed
> representation.
>
> Why don't we get that for tuples of floats only ?

Because tuples are generic data types.  Access to records and arrays are 
special cased- in the record case, because the compiler knows the type of 
the record, in the array case because array access is via C code which 
handles the special case.  But the compiler needs to be able to compile 
code with generic tuple accesses, like:

let third_of_four (_, _, x, _) -> x;;

Fixing this would require a major rearchitecting and rewrite of not only 
the compiler, but also the garbage collector, the run time, and all the C 
bindings that have been written.

Brian

  parent reply	other threads:[~2009-11-08 19:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-08 16:01 Daniel Bünzli
2009-11-08 16:46 ` [Caml-list] " Jon Harrop
2009-11-08 17:29 ` Martin Jambon
2009-11-08 19:39 ` Brian Hurt [this message]
2009-11-08 20:36   ` Jon Harrop
2009-11-08 20:09 ` Richard Jones
2009-11-08 20:58   ` Christophe Raffalli
2009-11-08 21:25     ` Lukasz Stafiniak

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=alpine.DEB.2.00.0911081436090.31905@sergyar \
    --to=bhurt@spnz.org \
    --cc=caml-list@inria.fr \
    --cc=daniel.buenzli@erratique.ch \
    /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).