#9630: compile-time performance regression (probably due to Generics) -------------------------------------+------------------------------------- Reporter: hvr | Owner: simonpj Type: bug | Status: new Priority: high | Milestone: 7.12.1 Component: Compiler | Version: 7.9 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: #9583 | Differential Revisions: -------------------------------------+------------------------------------- Comment (by darchon): I have another data-point for this performance bug: http://hackage.haskell.org/package/unbound-generics. Compiling the following example: https://github.com/lambdageek/unbound- generics/blob/master/examples/F.hs {{{ $ uname -a Darwin wlan022084.mobiel.utwente.nl 14.1.0 Darwin Kernel Version 14.1.0: Thu Feb 26 19:26:47 PST 2015; root:xnu-2782.10.73~1/RELEASE_X86_64 x86_64 ############################################################################# $ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.8.4 $ ghc -O -c -Rghc-timing -fforce-recomp -Wnot F.hs <<ghc: 1721650904 bytes, 3317 GCs, 16624472/43436104 avg/max bytes residency (12 samples), 112M in use, 0.00 INIT (0.00 elapsed), 1.85 MUT (2.22 elapsed), 1.52 GC (2.03 elapsed) :ghc>> ############################################################################# $ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.10.0.20150323 $ ghc -O -c -Rghc-timing -fforce-recomp -Wnot F.hs <<ghc: 13422435616 bytes, 21356 GCs, 46569528/80396192 avg/max bytes residency (25 samples), 221M in use, 0.000 INIT (0.001 elapsed), 11.911 MUT (12.895 elapsed), 10.298 GC (10.973 elapsed) :ghc>> }}} The interesting parts of running with -v2 are: {{{ $ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.8.4 $ ghc -O -c -Rghc-timing -fforce-recomp -Wnot -v2 F.hs [...] Result size of Simplifier = {terms: 2,583, types: 8,513, coercions: 1,371} *** Specialise: Result size of Specialise = {terms: 2,583, types: 8,513, coercions: 1,371} *** Float out(FOS {Lam = Just 0, Consts = True, PAPs = False}): Result size of Float out(FOS {Lam = Just 0, Consts = True, PAPs = False}) = {terms: 2,923, types: 9,081, coercions: 1,371} *** Float inwards: Result size of Float inwards = {terms: 2,923, types: 9,081, coercions: 1,371} *** Simplifier: Result size of Simplifier iteration=1 = {terms: 6,490, types: 31,862, coercions: 17,447} [...] ############################################################################# $ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.10.0.20150323 $ ghc -O -c -Rghc-timing -fforce-recomp -Wnot -v2 F.hs [...] Result size of Simplifier = {terms: 2,028, types: 5,759, coercions: 1,207} *** Specialise: Result size of Specialise = {terms: 11,945, types: 48,810, coercions: 9,282} *** Float out(FOS {Lam = Just 0, Consts = True, OverSatApps = False}): Result size of Float out(FOS {Lam = Just 0, Consts = True, OverSatApps = False}) = {terms: 14,293, types: 68,412, coercions: 9,282} *** Simplifier: Result size of Simplifier iteration=1 = {terms: 22,244, types: 103,329, coercions: 35,450} [...] }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9630#comment:10> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler