Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: -- (:)
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 Archives:
Bug reports: FAQ:
Beginner's list: