Executable size?

Simon Marlow simonmar at microsoft.com
Thu Nov 13 09:43:08 EST 2003


 
> [apologies to anybody who sees the rather similar message I posted to
> caml-list...]
> 
> How does Haskell (ghc) compare with languages like O'Caml, C 
> and C++ for
> executable size?  How big is the runtime library?
> 
> Are there any easily-identifiable, non-obvious, factors that affect
> executable size (I'm talking about end-use factors, rather 
> those resulting
> from the design decisions taken by the language designers and
> implementors)?
> 
> I currently use Python by preference, but I'm interested in a language
> (other than C/C++!) that doesn't depend on a big runtime library and
> generates "reasonably" small executables -- modems are here 
> to stay for a while yet.

We do our best to keep the executable sizes down, but the fact is that
GHC binaries are mostly statically linked, so they're going to be large.
There's a FAQ entry on static vs. dynamic linking if you're interested.

It might be possible to implement dynamic linking these days, because
one of the obstacles that prevented it in the past was removed in GHC
6.0 (as a result of eval/apply, we no longer need to identify the
extents of text segments in the address space).

Cheers,
	Simon



More information about the Glasgow-haskell-users mailing list