[GHC] #14880: GHC panic: updateRole

GHC ghc-devs at haskell.org
Tue Aug 7 02:27:30 UTC 2018


#14880: GHC panic: updateRole
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  goldfire
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.8.1
       Component:  Compiler (Type    |              Version:  8.2.2
  checker)                           |
      Resolution:                    |             Keywords:  TypeInType
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #15076            |  Differential Rev(s):  Phab:D4769
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by goldfire):

 OK. So `NDFV` behaves roughly identically to `FV` -- faster than just a
 bare `VarSet`. But ''why''?

 Let's look at the difference between `NDFV` and `VarSet`.

 1. The former has an `InterestingVarFun`. But I don't believe that's used
 in your tests.

 2. The former maintains a set of elements to be removed, while the latter
 just algorithmically removes elements when necessary.

 3. The former uses an accumulator to build sets, while the latter does
 not.

 Which of these factors contributes to the performance change? To learn
 this, we can test each in isolation, by removing the difference and then
 measuring. I suspect (2). If this is the case, perhaps we'll discover an
 optimization that can apply well beyond GHC!

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


More information about the ghc-tickets mailing list