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

GHC ghc-devs at haskell.org
Sun Sep 20 15:19:10 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):

 I have cut down the `tests/Tests/Vector.hs` file from `vector` commit
 `e000d6c50e68f539a6f6cfa35fe91350a0691499` to something a bit more minimal
 that may still exhibit a similar slow-down. The result is the following,
 {{{#!hs
 module Tests.Vector (tests) where

 import Boilerplater
 import Utilities as Util

 import qualified Data.Vector.Generic as V
 import qualified Data.Vector

 import Test.QuickCheck

 import Test.Framework
 import Test.Framework.Providers.QuickCheck2

 import Data.List

 #define COMMON_CONTEXT(a, v) \
  VANILLA_CONTEXT(a, v), VECTOR_CONTEXT(a, v)

 #define VANILLA_CONTEXT(a, v) \
   Eq a,     Show a,     Arbitrary a,     CoArbitrary a,     TestData a,
 Model a ~ a,        EqTest a ~ Property

 #define VECTOR_CONTEXT(a, v) \
   Eq (v a), Show (v a), Arbitrary (v a), CoArbitrary (v a), TestData (v
 a), Model (v a) ~ [a],  EqTest (v a) ~ Property, V.Vector v a


 testTuplyFunctions:: forall a v. (COMMON_CONTEXT(a, v), VECTOR_CONTEXT((a,
 a), v), VECTOR_CONTEXT((a, a, a), v)) => v a -> [Test]
 testTuplyFunctions _ = $(testProperties ['prop_unzip3])
   where
     prop_unzip3 :: P (v (a, a, a) -> (v a, v a, v a))   = V.unzip3 `eq`
 unzip3

 tests = [
         testGroup "Data.Vector.Vector (Bool)"
 (testTuplyFunctions      (undefined :: Data.Vector.Vector Bool))
     ]
 }}}

 GHC 7.10.1 takes around 30% longer than 7.8.3 with this simple example,
 with the program size peaking at 10000 terms during specialization, as
 opposed to 7.8 which never goes above 400 terms.

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


More information about the ghc-tickets mailing list