caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Ulf Wiger (TN/EAB)" <ulf.wiger@ericsson.com>
To: peng.zang@gmail.com
Cc: caml-list@yquem.inria.fr, Ben Aurel <ben.aurel@gmail.com>
Subject: Re: [Caml-list] native vs bytecode
Date: Thu, 07 Aug 2008 09:38:35 +0200	[thread overview]
Message-ID: <489AA67B.2030300@ericsson.com> (raw)
In-Reply-To: <200808061609.38758.peng.zang@gmail.com>

Peng Zang skrev:
> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
> 
> What do you mean by "dynamically load"?
> 
> You cannot mix native and bytecode generally speaking.
> 
> I don't know of any speed comparisons of OCaml bytecode.  You can
> always compile to native code, which is faster, so I don't understand
> why you would want to run anything large with bytecode.
> 
> Peng

I don't know how it is for ocaml, but in Erlang, it wouldn't be
considered strange to mix native and bytecode. The main reason
is that native code increases memory footprint compared to the
very compact bytecode. In systems with hundreds of KLOC of
code, this can make a significant difference.

There is a performance penalty when switching from native to
byte code, so one needs to try to minimize the number of
transitions in order not to cancel the effect of native
compilation.

Historically, it's been a problem that while native code
could be dynamically loaded, old code couldn't be purged
after code upgrade. I believe this problem is solved now,
or will be soon.

Again, I don't know how relevant this is to Ocaml. It was
mainly intended as an answer to the question why one would
like to mix native and bytecode.

BR,
Ulf W


  reply	other threads:[~2008-08-07  7:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-06 19:58 Ben Aurel
2008-08-06 20:05 ` [Caml-list] " Alain Frisch
2008-08-07  1:24   ` Matt Gushee
2008-08-07 12:46     ` Richard Jones
2008-08-06 20:09 ` Peng Zang
2008-08-07  7:38   ` Ulf Wiger (TN/EAB) [this message]
2008-08-06 21:21 ` Richard Jones
2008-08-07 13:02   ` Kuba Ober
2008-08-07 13:13     ` Kuba Ober
2008-08-07 22:12       ` Michael Ekstrand
2008-08-06 21:47 ` [Caml-list] " Mauricio Fernandez
2008-08-07  0:34 ` Haoyang Wang

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=489AA67B.2030300@ericsson.com \
    --to=ulf.wiger@ericsson.com \
    --cc=ben.aurel@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=peng.zang@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).