[GHC] #10800: vector-0.11 compile time increased substantially with 7.10.1

GHC ghc-devs at haskell.org
Sun Sep 20 17:16:39 UTC 2015


#10800: vector-0.11 compile time increased substantially with 7.10.1
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                   Owner:  bgamari
            Type:  bug               |                  Status:  new
        Priority:  highest           |               Milestone:  8.0.1
       Component:  Compiler          |                 Version:  7.10.2
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  performance bug                    |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by bgamari):

 Well this potentially is interesting...

 `vector`'s test suite defines a type class `TestData`,
 {{{#!hs
 class (Testable (EqTest a), Conclusion (EqTest a)) => TestData a where
   type Model a
   model :: a -> Model a
   unmodel :: Model a -> a

   type EqTest a
   equal :: a -> a -> EqTest a
 }}}

 The `-ddump-simpl` output produced by 7.10 contains a variety of bindings
 referring to types containing `Model`, e.g.,
 {{{#!hs
 lvl18
   :: Model
        (Vector (Bool, Bool, Bool)
         -> (Vector Bool, Vector Bool, Vector Bool))
      -> Vector (Bool, Bool, Bool)
      -> (Vector Bool, Vector Bool, Vector Bool)
 }}}
 whereas the Core produced by 7.8 contains no such references. I'm not sure
 whether this is problematic or not

 The simplified testcase above produces 6500 lines of Core in 7.10 and
 around 800 with 7.8. Despite the failure to resolve the `Model` type
 family, 7.10 seems to generally be doing more simplification. I believe
 much of the difference is due to the fact that 7.10 inlines the
 `$fTestData(,,)` dictionary whereas 7.8 does not.

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


More information about the ghc-tickets mailing list