caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Fabrice Le Fessant <fabrice.le_fessant@inria.fr>
To: Sylvain Le Gall <sylvain@le-gall.net>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Re: Subtyping structurally-equivalent records,	or something like it?
Date: Tue, 04 May 2010 17:18:00 +0200	[thread overview]
Message-ID: <4BE03AA8.30408@inria.fr> (raw)
In-Reply-To: <slrnhu092j.mc9.sylvain@gallu.homelinux.org>

"ocamlopt" does optimize data representation: for example, it can unbox
floats into registers, or into arrays of floats. However, there is a
tradeoff between such optimizations and efficiency: when you do too much
representation optimisation, you might end up performing a lot of tests
because a given type can be represented in multiple formats, and
performing a lot of transformations between the representations,
especially as the FFI (Ocaml interface to C) specifies the
representation of data.

Of course, I am not saying it is not possible to do better: it requires
a lot of energy, the compiler code becomes more complex, and the
improvement on speed is not clear.

--Fabrice


Sylvain Le Gall wrote, On 05/04/2010 03:42 PM:
> On 04-05-2010, rossberg@mpi-sws.org <rossberg@mpi-sws.org> wrote:
>> "Sylvain Le Gall" <sylvain@le-gall.net>:
>>> This is not about optimized compiler in this case but about data
>>> representation. Even if you use an optimized compiler (which is not
>>> really the case with ocamlopt), you won't change datastructure
>>> representation to optimize.
>> What do you mean? There is no reason in general why a compiler cannot
>> optimize data representations, and some do in cases like this.
>>
> 
> Anyway, if it comes to data alignement and things like that, the
> compiler should optimize data representations. But in this case, I
> really don't think we are talking about data alignement.
> 
> Regards,
> Sylvain Le Gall
> 
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
> 

-- 
Fabrice LE FESSANT
Chercheur, Equipe ASAP
(As Scalable As Possible)
http://www.lefessant.net/

INRIA-Futurs, Bat P - 112
Parc Orsay Université
2-4, rue Jacques Monod
F-91893 Orsay Cedex, FRANCE


  reply	other threads:[~2010-05-04 15:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-01 19:55 [Caml-list] " Dario Teixeira
2010-05-01 20:01 ` Sylvain Le Gall
2010-05-04 10:33   ` [Caml-list] " AUGER Cédric
     [not found]   ` <4429.86797211251$1272970133@news.gmane.org>
2010-05-04 11:53     ` Sylvain Le Gall
2010-05-04 12:47       ` [Caml-list] " rossberg
2010-05-04 13:42         ` Sylvain Le Gall
2010-05-04 15:18           ` Fabrice Le Fessant [this message]
2010-05-05  9:31         ` [Caml-list] " Goswin von Brederlow
2010-05-05 12:12           ` rossberg
2010-05-05 16:46             ` Goswin von Brederlow
2010-05-04 13:37       ` Edgar Friendly
2010-05-05  9:33         ` Goswin von Brederlow
2010-05-05 11:10         ` Yaron Minsky

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=4BE03AA8.30408@inria.fr \
    --to=fabrice.le_fessant@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=sylvain@le-gall.net \
    /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).