• niteria's avatar
    Kill non-deterministic foldUFM in TrieMap and TcAppMap · ad4392c1
    niteria authored
    foldUFM introduces unnecessary non-determinism that actually
    leads to different generated code as explained in
    Note [TrieMap determinism].
    As we're switching from UniqFM to UniqDFM here you might be
    concerned about performance. There's nothing that ./validate
    detects. nofib reports no change in Compile Allocations, but
    Compile Time got better on some tests and worse on some,
    yielding this summary:
            -1 s.d.                -----            -3.8%
            +1 s.d.                -----            +5.4%
            Average                -----            +0.7%
    This is not a fair comparison as the order of Uniques
    changes what GHC is actually doing. One benefit from making
    this deterministic is also that it will make the
    performance results more stable.
    Full nofib results: P108
    Test Plan: ./validate, nofib
    Reviewers: goldfire, simonpj, simonmar, austin, bgamari
    Reviewed By: simonpj
    Subscribers: thomie
    Differential Revision: https://phabricator.haskell.org/D2169
    GHC Trac Issues: #4012
NameEnv.hs 5.05 KB