Skip to content

compile-time performance regression (probably due to Generics)

This is a continuation of #9583 (closed)

Compiling latest Cabal from Git's Language.Haskell.Extension module shows a significant performance regression with respect to GHC 7.8.3:

$ uname -a
Linux duo 3.17.0-031700rc6-generic #201409211935 SMP Sun Sep 21 23:37:11 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

$ git describe 
cabal-install_merged-1912-g7161e4c

#############################################################################

$ /opt/ghc/7.8.3/bin/ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.8.3

$ /opt/ghc/7.8.3/bin/ghc -Rghc-timing -O -c Language/Haskell/Extension.hs 
<<ghc: 5228751760 bytes, 543 GCs, 
       34135677/114940864 avg/max bytes residency (14 samples),
       273M in use, 0.00 INIT (0.03 elapsed),
       4.96 MUT (5.28 elapsed), 3.26 GC (3.47 elapsed) :ghc>>

#############################################################################

$ /opt/ghc/head/bin/ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.9.20140923

$ /opt/ghc/head/bin/ghc -Rghc-timing -O -c Language/Haskell/Extension.hs 
<<ghc: 125917854120 bytes, 3181 GCs, 
       349136895/833496072 avg/max bytes residency (30 samples), 
       2096M in use, 0.001 INIT (0.001 elapsed),
       133.003 MUT (142.730 elapsed), 73.241 GC (78.234 elapsed) :ghc>>

Or in other words, this represents a ~7.7x "memory in use" and ~26x elapsed time regression

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