ghc image size

Jan de Wit Jan de Wit" <[email protected]
Fri, 14 Dec 2001 13:28:20 +0100


> I just recently starting to use the ghc compiler and am astonished by the
> size of the executables. Out of interest, why are they so large? Is there
> any work in progress to make the resulting executable/object somewhat more
> "normal" in size?
> I read in the Haskell mailing list archives discussions relating to
> the barriers to broader acceptance of functional programming by the
> programming community (in particular Haskell) - I would regard this as one
> of these barriers.

When I want to send compiled Haskell programs by email or put them on the
web for distribution, I run 'strip' on them and, if I'm on Linux or Win32, I
run UPX on it as well. UPX is an executable packer, see for details. This routinely brings programs down
from over 2 MB to around 250Kb which is small enough for me.

Hope this helps,

Jan de Wit