caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "David Allsopp" <dra-news@metastack.com>
To: "'Jon Harrop'" <jon@ffconsultancy.com>, <caml-list@yquem.inria.fr>
Subject: RE: [Caml-list] Native dynlink on 3.11: a request for packagers
Date: Sat, 22 Nov 2008 07:40:41 -0000	[thread overview]
Message-ID: <00d301c94c75$9f676d90$de3648b0$@com> (raw)
In-Reply-To: <200811220119.38157.jon@ffconsultancy.com>

On 22 November 2008 01:20 Jon Harrop wrote:
> On Friday 21 November 2008 23:45:34 Dario Teixeira wrote:
> > Hi,
> >
> > > Does ocamlfind support any of this?  Since I'm now also
> > > cross-compiling OCaml, I've certainly come to appreciate
> > > findlib more than ever.
> >
> > Indeed it does.  The current version of Ocsigen already
> > makes use of this feature.  However, because very few
> > (none, actually, other than Ocsigen's) packages currently
> > ship with cmxs files, an Ocsigen user who wants to play
> > with native code is forced to manually generate them.
> > (What impelled me to write the request was precisely
> > having just gone through the process of producing the
> > cmxs for a bunch of Ocamlnet and PXP libraries...)
> 
> This begs the question: what is the advantage of a .cmxa over a .cmxs,
> and
> what are the downsides of linking everything dynamically?

That's reducible to the standard debate of static vs dynamic linking in any language, surely? The only "impact" on performance presumably is the re-writing of the symbol tables which flexlink/dlopen does as the .cmxs file is loaded but that must be negligible. However, isn't ocamlopt able to do some cross-module optimisation (which is why .cmx files are usually shipped as well as .cmxa) - this presumably isn't possible when linking dynamically...

Short-term, native dynlink doesn't work on all platforms (AFAIK?) so .cmxa is not dead, whatever your linking preference.


David


  reply	other threads:[~2008-11-22  7:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-21 19:29 Dario Teixeira
2008-11-21 23:18 ` [Caml-list] " Richard Jones
2008-11-21 23:45   ` Dario Teixeira
2008-11-22  1:19     ` Jon Harrop
2008-11-22  7:40       ` David Allsopp [this message]
2008-11-22 15:33     ` Gerd Stolpmann
2008-11-22 19:02       ` Dario Teixeira
2008-11-22 11:22 ` Stefano Zacchiroli
2008-11-22 15:00 ` Daniel Bünzli
2008-11-22 18:40   ` Alain Frisch
2008-11-25 19:36 ` Daniel Bünzli
2008-11-25 20:48   ` Dario Teixeira
2008-11-26  8:16   ` Stefano Zacchiroli

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='00d301c94c75$9f676d90$de3648b0$@com' \
    --to=dra-news@metastack.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=jon@ffconsultancy.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).