[GHC] #7258: Compiling DynFlags is jolly slow

GHC ghc-devs at haskell.org
Thu Oct 26 13:26:11 UTC 2017


#7258: Compiling DynFlags is jolly slow
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                Owner:  simonpj
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.6.1
      Resolution:                    |             Keywords:  deriving-perf
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 tdammers):

 Replying to [comment:61 simonpj]:
 > Indeed.  Actually any use of `elem` on a long list is suspicious.   c.f.
 `ListSetOpts.unionLists` which warns if it sees long lists.
 >
 > Maybe we could have `ListSetOps.checkedElem` which checks for over-long
 lists and warns.  And change all uses of `elem` into `checkedElem`.  There
 may be more of these land-mines!

 What about using a different kind of data structure like a map or similar,
 that has logarithmic lookup performance? That would work even if we cannot
 reduce the size of the list, but if the list is short-lived, constructing
 the map might introduce prohibitive overhead?

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


More information about the ghc-tickets mailing list