Opened 3 years ago

Closed 3 years ago

#13789 closed task (fixed)

Look into haddock performance regressions due to desugaring on -fno-code

Reported by: bgamari Owned by: duog
Priority: normal Milestone: 8.4.1
Component: Compiler Version: 8.0.1
Keywords: Cc: duog
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Compile-time performance bug Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D3629
Wiki Page:

Description

c9eb4385aad248118650725b7b699bb97ee21c0d enabled desugaring when GHC is invoked with -fno-code in order to resolve #10600. Unfortunately this causes GHC to do more (unnecessary) work when parsing for haddock, causing some rather significant allocations regressions in the haddock performance tests,

bytes allocated value is too high:
    Expected    haddock.base(normal) bytes allocated: 25592972912 +/-5%
    Lower bound haddock.base(normal) bytes allocated: 24313324266 
    Upper bound haddock.base(normal) bytes allocated: 26872621558 
    Actual      haddock.base(normal) bytes allocated: 27868466432 
    Deviation   haddock.base(normal) bytes allocated:         8.9 %
*** unexpected stat test failure for haddock.base(normal)
=====> haddock.Cabal(normal) 6 of 7 [0, 0, 0]
bytes allocated value is too high:
    Expected    haddock.Cabal(normal) bytes allocated: 18269309128 +/-5%
    Lower bound haddock.Cabal(normal) bytes allocated: 17355843671 
    Upper bound haddock.Cabal(normal) bytes allocated: 19182774585 
    Actual      haddock.Cabal(normal) bytes allocated: 22294859000 
    Deviation   haddock.Cabal(normal) bytes allocated:        22.0 %
*** unexpected stat test failure for haddock.Cabal(normal)
=====> haddock.compiler(normal) 7 of 7 [0, 0, 0]
bytes allocated value is too high:
    Expected    haddock.compiler(normal) bytes allocated: 52762752968 +/-10%
    Lower bound haddock.compiler(normal) bytes allocated: 47486477671 
    Upper bound haddock.compiler(normal) bytes allocated: 58039028265 
    Actual      haddock.compiler(normal) bytes allocated: 65378619232 
    Deviation   haddock.compiler(normal) bytes allocated:        23.9 %
*** unexpected stat test failure for haddock.compiler(normal)

Work out how to mitigate this.

Change History (6)

comment:1 Changed 3 years ago by duog

Owner: set to duog
Type of failure: None/UnknownCompile-time performance bug

Looking into this now.

comment:2 Changed 3 years ago by duog

This is due to haddock being run with --optghc=-dcore-lint in ./validate

I've submitted a patch which resolves this by not passing -dcore-lint on to haddock.

Version 0, edited 3 years ago by duog (next)

comment:3 Changed 3 years ago by duog

Differential Rev(s): Phab: D3629
Status: newpatch

comment:4 Changed 3 years ago by duog

Differential Rev(s): Phab: D3629Phab:D3629

comment:5 Changed 3 years ago by Ben Gamari <ben@…>

In b10d3f36/ghc:

Don't pass -dcore-lint to haddock in Haddock.mk

This fixes the regressions in the haddock performance tests introduced
in c9eb4385aad248118650725b7b699bb97ee21c0d.

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: rwbarton, thomie

GHC Trac Issues: #13789

Differential Revision: https://phabricator.haskell.org/D3629

comment:6 Changed 3 years ago by bgamari

Resolution: fixed
Status: patchclosed
Note: See TracTickets for help on using tickets.