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 (20:52)
From: Brian Hurt <bhurt@s...>
Subject: Re: [Caml-list] Executable size?
On Wed, 12 Nov 2003, John J Lee wrote:

> > In addition to a more complicated and complete standard library and
> > bultins, Ocaml also has garbage collection, which is non-trivial to
> > implement.  I wouldn't be surprised if half or more of that 100K of
> > overhead is just the GC.
> Ah, of course!

Actually, about a third of it seems to be debugging information, which 
goes away with strip.
> > I was using it in the most literal sense- using code more than once, in
> > more than one way.  In general, it's much better to have only one copy of
> > a function, used in two places, than two copies of the function.  The
> [...]
> Got you.  The template explosion problem in C++, eg.

I've been trying hard not to badmouth C++ here :-).  
> > I was thinking of special cases where the difference of a 100K or 1M or so
> > is the difference between working and not working.  If you are, for
> > example, trying to fit your program on a 512K ROM, Ocaml's overhead might
> > be a problem.
> Or if people are willing to download 100k but not 1M.

It would be an exceeding large program- or a delibertly perverse one- 
which managed to use *all* the libraries Ocaml provides.

And speaking as someone who still gets onto the internet via a 56K baud 
modem, download a megabyte isn't that bad.  I routinely get 5K/second on 
downloads, so a megabyte is ~3.5 minutes.  It's a bathroom break, sure, 
but not unreasonable.
"Usenet is like a herd of performing elephants with diarrhea -- massive,
difficult to redirect, awe-inspiring, entertaining, and a source of
mind-boggling amounts of excrement when you least expect it."
                                - Gene Spafford 

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