[Haskell-beginners] Large binary overhead?

Erik de Castro Lopo mle+hs at mega-nerd.com
Thu May 26 06:02:58 CEST 2011


Christopher Howard wrote:

> I'm still going through the GHC tutorial, so be patient with me: But why
> is it that my GHC-produced executables are always so large? Even my one
> line Hello World program ends up being over 500KB. I thought maybe it
> was because all of the functionality was statically compiled in, but I
> used ldd and saw that my hello world binary links dynamically to 10
> different C libraries.

Its that size because the Haskell libraries are statically linked
into your program.

See this SO question/answer:

   http://stackoverflow.com/questions/6115459/small-haskell-program-compiled-with-ghc-into-huge-binary

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/



More information about the Beginners mailing list