Binary bloat in 7.10

Thomas Miedema thomasmiedema at
Fri Apr 3 00:48:03 UTC 2015


On Thu, Apr 2, 2015 at 2:12 PM, Thomas Miedema <thomasmiedema at>

> Maybe `split-objs` is not applied?

That suggestion was completely misguided. Compiling with `-split-objs`
makes a library _grow_ in size, but makes executables that link against it

Size of `libHSCabal-` obtained by running `cabal install
Cabal== --with-ghc=ghc-x.x.x (--enable-split-objs)`, on 64bit

        default   --enable-split-objs
7.8.4:  19Mb      46Mb
7.10.1: 21Mb      52Mb

So the 7.10 versions are indeed somewhat larger, but I wouldn't call it
ballooned or bloated. Note that a ghc build compiles the libraries with -O2
, which increases the binary size another 5% or so.

All these numbers are not far off from the ones you were getting. I think
you have been comparing a 7.8.4 build of Cabal without split objects, with
a 7.10.1 build of Cabal with split objects.

I don't think there is a bug here.


P.S. To show that binary sizes not only grow with new ghc releases, here is
the same experiment with random:

`cabal install random== --with-ghc=ghc-x.x.x (--enable-split-objs)`

        default  --enable-split-objs
7.0.4:  0.94M    1.9M
7.2.2:  1.1M     2.1M
7.4.2:  0.86M    1.8M
7.6.3:  0.85M    1.8M
7.8.4:  0.76M    1.7M
7.10.1: 0.69M    1.6M
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Glasgow-haskell-users mailing list