Skip to content

Master branch is ~10% slower to compile cabal than the 9.4 branch.

Instructions executed and compile time go up by ~10% between the 9.4 branch and the master branch. Allocations are also a good deal higher. I used the release flavour for both builds.

This is a worryingly large regression. I know it can vary quite a bit through the way our uniques and UniqSets work. But 10% seems too large for noise and might be worth investigating.

Stats for 9.4 branch ( commit 8c7dcdab (HEAD -> ghc-9.4, origin/wip/ghc-9.4-backports-5, origin/ghc-9.4) )

 169,125,181,576 bytes allocated in the heap
  12,950,676,296 bytes copied during GC
     493,684,200 bytes maximum residency (21 sample(s))
       5,087,992 bytes maximum slop
            1339 MiB total memory in use (0 MB lost due to fragmentation)

                                     Tot time (elapsed)  Avg pause  Max pause
  Gen  0      1964 colls,     0 par   11.462s  11.471s     0.0058s    0.1410s
  Gen  1        21 colls,     0 par    3.326s   3.328s     0.1585s    0.4067s

  TASKS: 5 (1 bound, 4 peak workers (4 total), using -N1)

  SPARKS: 0 (0 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled)

  INIT    time    0.000s  (  0.000s elapsed)
  MUT     time   82.647s  ( 86.112s elapsed)
  GC      time   14.788s  ( 14.799s elapsed)
  EXIT    time    0.000s  (  0.009s elapsed)
  Total   time   97.436s  (100.920s elapsed)

  Alloc rate    2,046,343,653 bytes per MUT second

  Productivity  84.8% of total user, 85.3% of total elapsed


 Performance counter stats for '/home/andi/ghc_94/_release/stage1/bin/ghc -package parsec -XHaskell2010 -hidir _cabal_out -odir _cabal_out -ilibraries/Cabal/Cabal -ilibraries/Cabal/Cabal-syntax/src -ilibraries/Cabal/Cabal/src libraries/Cabal/Cabal/Setup.hs +RTS -s -RTS -fforce-recomp -O +RTS -s' (3 runs):

        100,919.38 msec task-clock                #    0.997 CPUs utilized            ( +-  0.06% )
            22,609      context-switches          #    0.224 K/sec                    ( +-  0.70% )
                 0      cpu-migrations            #    0.000 K/sec
           859,449      page-faults               #    0.009 M/sec                    ( +-  0.21% )
   403,163,382,232      cycles                    #    3.995 GHz                      ( +-  0.04% )
   478,561,691,808      instructions              #    1.19  insn per cycle           ( +-  0.02% )
    90,498,905,272      branches                  #  896.745 M/sec                    ( +-  0.02% )
     4,478,853,854      branch-misses             #    4.95% of all branches          ( +-  0.05% )

           101.255 +- 0.165 seconds time elapsed  ( +-  0.16% )

Stats for master ( commit 46050534 )

 181,504,184,480 bytes allocated in the heap
  13,469,363,584 bytes copied during GC
     494,497,864 bytes maximum residency (21 sample(s))
       8,660,904 bytes maximum slop
            1392 MiB total memory in use (0 MB lost due to fragmentation)

                                     Tot time (elapsed)  Avg pause  Max pause
  Gen  0      2086 colls,     0 par   12.214s  12.223s     0.0059s    0.1966s
  Gen  1        21 colls,     0 par    3.352s   3.354s     0.1597s    0.4300s

  TASKS: 5 (1 bound, 4 peak workers (4 total), using -N1)

  SPARKS: 0 (0 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled)

  INIT    time    0.000s  (  0.000s elapsed)
  MUT     time   91.771s  ( 95.156s elapsed)
  GC      time   15.566s  ( 15.577s elapsed)
  EXIT    time    0.000s  (  0.007s elapsed)
  Total   time  107.337s  (110.740s elapsed)

  Alloc rate    1,977,805,269 bytes per MUT second

  Productivity  85.5% of total user, 85.9% of total elapsed


 Performance counter stats for '/home/andi/ghc_head/_release/stage1/bin/ghc -package parsec -XHaskell2010 -hidir _cabal_out -odir _cabal_out -ilibraries/Cabal/Cabal -ilibraries/Cabal/Cabal-syntax/src -ilibraries/Cabal/Cabal/src libraries/Cabal/Cabal/Setup.hs +RTS -s -RTS -fforce-recomp -O +RTS -s' (3 runs):

        111,104.01 msec task-clock                #    0.999 CPUs utilized            ( +-  0.15% )
            24,743      context-switches          #    0.223 K/sec                    ( +-  0.98% )
                 0      cpu-migrations            #    0.000 K/sec
           870,222      page-faults               #    0.008 M/sec                    ( +-  0.41% )
   444,139,464,987      cycles                    #    3.998 GHz                      ( +-  0.14% )
   523,449,132,743      instructions              #    1.18  insn per cycle           ( +-  0.25% )
    99,160,736,124      branches                  #  892.504 M/sec                    ( +-  0.24% )
     4,852,739,041      branch-misses             #    4.89% of all branches          ( +-  0.27% )

           111.233 +- 0.218 seconds time elapsed  ( +-  0.20% )
Edited by Andreas Klebinger
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information