[GHC] #11545: Strictness signature blowup

GHC ghc-devs at haskell.org
Sat Apr 30 20:29:28 UTC 2016


#11545: Strictness signature blowup
-------------------------------------+-------------------------------------
        Reporter:  jscholl           |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
      Resolution:                    |             Keywords:
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 osa1):

 This is because of demand analysis -- the usage part of the demand
 signature of
 {{{(/=)}}} isn't reaching to a fixpoint, so it's looping 10 times (because
 that's the hard-coded upper bound for fixpoint iterations), each time
 generating
 a bigger usage type.

 I'm a bit confused about why this is happening though. First, strictness
 type is
 reaching to a fixpoint very fast (maybe in the first iteration), but why?
 Second, {{{(/=)}}} is actually defined as {{{not (a == b)}}}, and
 {{{(==)}}} is
 demand type is top (i.e. (Lazy, Used)). This looks wrong to me, because
 the
 definition has case expressions on arguments and recursively calls itself.
 The
 strictness part should be more precise than that..

 (more on this later...)

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


More information about the ghc-tickets mailing list