Browse thread
native vs bytecode
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Ulf Wiger (TN/EAB) <ulf.wiger@e...> |
| Subject: | Re: [Caml-list] native vs bytecode |
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