[commit: ghc] wip/D3646: Make module membership on ModuleGraph faster (9f86f36)

git at git.haskell.org git at git.haskell.org
Wed Jun 14 22:13:11 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/D3646
Link       : http://ghc.haskell.org/trac/ghc/changeset/9f86f367b4eba8cb594a6fcc572ffbd7ac30467d/ghc

>---------------------------------------------------------------

commit 9f86f367b4eba8cb594a6fcc572ffbd7ac30467d
Author: Bartosz Nitka <niteria at gmail.com>
Date:   Wed May 31 10:47:03 2017 -0700

    Make module membership on ModuleGraph faster
    
    Summary:
    When loading/reloading with a large number of modules
    (>5000) the cost of linear lookups becomes significant.
    
    The changes here made `:reload` go from 6s to 1s on my
    test case.
    
    The bottlenecks were `needsLinker` in `DriverPipeline` and
    `getModLoop` in `GhcMake`.
    
    Test Plan: ./validate
    
    Reviewers: simonmar, austin, bgamari
    
    Subscribers: rwbarton, thomie
    
    Differential Revision: https://phabricator.haskell.org/D3646


>---------------------------------------------------------------

9f86f367b4eba8cb594a6fcc572ffbd7ac30467d
 compiler/backpack/DriverBkp.hs                |   5 +-
 compiler/main/DriverMkDepend.hs               |  16 ++--
 compiler/main/DriverPipeline.hs               |   5 +-
 compiler/main/GHC.hs                          |  23 ++---
 compiler/main/GhcMake.hs                      |  54 ++++++-----
 compiler/main/HscMain.hs                      |   2 +-
 compiler/main/HscTypes.hs                     | 123 ++++++++++++++++++++++++--
 ghc/GHCi/UI.hs                                |  23 ++---
 ghc/GHCi/UI/Tags.hs                           |   2 +-
 testsuite/tests/ghc-api/apirecomp001/myghc.hs |   4 +-
 utils/check-api-annotations/Main.hs           |  10 +--
 utils/check-ppr/Main.hs                       |   2 +-
 utils/ghctags/Main.hs                         |   6 +-
 13 files changed, 200 insertions(+), 75 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 9f86f367b4eba8cb594a6fcc572ffbd7ac30467d


More information about the ghc-commits mailing list