[GHC] #14944: Compile speed regression

GHC ghc-devs at haskell.org
Tue Mar 20 22:12:59 UTC 2018


#14944: Compile speed regression
-------------------------------------+-------------------------------------
        Reporter:  br1               |                Owner:  dfeuer
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.4.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by dfeuer):

 The reason for the big version gap seems likely to be the fact that the
 code didn't compile at all under 7.8.4 or 7.10.3 without extra help. Here
 are the times I get:

 === 7.8.4

 This version needed `-fcontext-stack=197` to compile.

 <<ghc: 2588144288 bytes, 592 GCs, 25821661/80891272 avg/max bytes
 residency (13 samples), 193M in use, 0.00 INIT (0.00 elapsed), 2.29 MUT
 (2.62 elapsed), 1.11 GC (1.19 elapsed) :ghc>>

 === 7.10.3

 This version needed `-fcontext-stack=197` to compile.

 <<ghc: 5430939912 bytes, 1222 GCs, 39907279/99169560 avg/max bytes
 residency (14 samples), 271M in use, 0.001 INIT (0.001 elapsed), 5.319 MUT
 (5.672 elapsed), 1.918 GC (1.999 elapsed) :ghc>>


 === 8.0.2

 <<ghc: 9858859496 bytes, 2263 GCs, 37541990/110403672 avg/max bytes
 residency (13 samples), 291M in use, 0.000 INIT (0.001 elapsed), 7.649 MUT
 (8.086 elapsed), 1.850 GC (1.959 elapsed) :ghc>>

 === 8.2.2

 <<ghc: 5344419472 bytes, 543 GCs, 33955491/118029880 avg/max bytes
 residency (14 samples), 265M in use, 0.000 INIT (0.001 elapsed), 5.230 MUT
 (5.678 elapsed), 1.589 GC (1.674 elapsed) :ghc>>

 === 8.4.1

 <<ghc: 5160053968 bytes, 577 GCs, 30157126/79839112 avg/max bytes
 residency (14 samples), 207M in use, 0.000 INIT (0.005 elapsed), 4.415 MUT
 (4.930 elapsed), 1.509 GC (1.654 elapsed) :ghc>>

 So there was a major regression from 7.8.4 to 7.10.3, another large one
 from 7.10.3 to 8.0.2, a large improvement from 8.0.2 to 8.2.2, and a
 smaller improvement from 8.2.2 to 8.4.1. I can verify that we're still
 running considerably slower, and allocating considerably more, than 7.8.4.
 FYI, while we no longer need `-fcontext-stack`, that's because the default
 limit has been raised or removed. It seems versions 8.0.2 through 8.4.1
 need a reduction depth of 199.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14944#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list