English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Re: [Caml-list] OCaml standard library improvement
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-02-22 (16:00)
From: John Max Skaller <skaller@o...>
Subject: Re: [Caml-list] OCaml standard library improvement
Nicolas George wrote:

> A string
> library should be one module, we agree. Let's say it is "String". Then
> as soon as you use one function of the String module, the resulting
> binary will hold _all_ the code in the String module. If you have a lot
> of functions in the module (and this is what we want), you have a huge
> binary. Berk.
> As far as I know, there is no hack to avoid it. It would be necessary to
> rethink the format of the .cmo or .cma files to allow that.

Two viewpoints:

(1) in the "old" days, one could extract only
needed functions from libraries: this kept executables small.

(2) in the modern system, the whole library is shared
and linked dynamically, so the executable doesn't include
the code at all. The actual overhead depends on how many
processes share the code.

So there are two ways forward:

(1) split libraries into
segments to ensure minimal static linkage

(2) make ocaml emit code which can be linked
into a shared library

Whilst these tasks are not mutually exclusive,

I'd see (1) as a nice optimisation, whilst (2) is
a pre-requisite for industrial acceptance.

John Max Skaller, mailto:skaller@ozemail.com.au
snail:10/1 Toxteth Rd, Glebe, NSW 2037, Australia.

To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners