Skip to content

Compiler memory usage regressions for aeson in GHC 8.8 and 9.0.1

Summary

Peak memory allocations for building aeson-1.5.6.0 increased by ca. 100% from GHC 8.6.5 to 8.8.4 and by another ca. 50% from 8.10.4 to 9.0.1.

Reproduction

$ cabal get aeson-1.5.6.0 && cd aeson-1.5.6.0
$ cat > cabal.project
packages: .
package aeson
  ghc-options: -Rghc-timing
^D
$ cabal build

Results

GHC version Peak megabytes allocated Mutator CPU time in seconds GC CPU time in seconds
8.4.4 947 133.281 44.035
8.6.5 968 135.371 45.080
8.8.4 1928 132.890 47.662
8.10.4 1973 135.847 47.235
9.0.1 2944 153.501 67.389

Note that aeson uses -O2.

Edited by Simon Jakobi
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information