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
[Caml-list] Executable size?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-11-12 (22:18)
From: Eric Dahlman <edahlman@a...>
Subject: Re: [Caml-list] Executable size?
John J Lee wrote:
> On Wed, 12 Nov 2003, Brian Hurt wrote:
>>Currying, exceptions, etc. also have small size penalties. 
> OK.  I'm now enlightened on that point -- clearly, O'Caml's runtime is an
> absolute requirement for an O'Caml program (unlike C/C++).

C and C++ are not special in this regard, they just happen to be shipped 
with the operating system.  On my box hello world links against  libc.so 
and ld.so which are 1,531,964 and 103,044 bytes respectively.

One way to even things up is require the C version to link to all of its 
libraries statically.  Compiling with 'gcc -static test.c' I get an 
a.out file which is 423,441 bytes long.  So the static linker was able 
to throw better than 2/3 of libc but it still isn't to light.

Really what you need to do is lobby Microsoft and Apple to include ocaml 
as part of the base system install and then things might even out ;-)

-Eric

-------------------
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