[GHC] #13535: vector test suite uses excessive memory on GHC 8.2

GHC ghc-devs at haskell.org
Thu Jul 6 04:18:44 UTC 2017


#13535: vector test suite uses excessive memory on GHC 8.2
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  bgamari
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.2.1
       Component:  Compiler          |              Version:  8.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #10800            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by dfeuer):

 Starting with `vector` 1d208ee9e3a252941ebd112e14e8cd5a982ac2bb, replace
 `tests/Test/Vector.hs` with the attached file. Compile using

 {{{
 -no-link -fbuilding-cabal-package -static -dynamic-too -dynosuf dyn_o \
 -dynhisuf dyn_hi -outputdir dist/build/vector-tests-O2/vector-tests-O2-tmp
 \
 -odir dist/build/vector-tests-O2/vector-tests-O2-tmp -hidir \
 dist/build/vector-tests-O2/vector-tests-O2-tmp -stubdir \
 dist/build/vector-tests-O2/vector-tests-O2-tmp -i \
 -idist/build/vector-tests-O2/vector-tests-O2-tmp -itests \
 -idist/build/autogen -Idist/build/autogen \
 -Idist/build/vector-tests-O2/vector-tests-O2-tmp \
 -optP-include -optPdist/build/autogen/cabal_macros.h -hide-all-packages \
 -package-db dist/package.conf.inplace -package HUnit-1.6.0.0 \
 -package QuickCheck-2.9.2 -package base -package random-1.1 -package \
 template-haskell -package test-framework-0.8.1.1 -package \
 test-framework-hunit-0.3.0.2 -package test-framework-quickcheck2-0.3.0.3 \
 -package transformers-0.5.2.0 -package vector-0.12.0.1 -XHaskell2010 \
 -XCPP -XScopedTypeVariables -XPatternGuards -XMultiParamTypeClasses \
 -XFlexibleContexts -XRank2Types -XTypeSynonymInstances -XTypeFamilies \
 -XTemplateHaskell tests/Tests/Vector.hs -O2 -fno-warn-orphans \
 -fno-warn-missing-signatures -Rghc-timing -v -ddump-simpl -ddump-to-file
 }}}

 In the below, the "offending patch" is
 1c4a39d3a8d36803382792ff78b4709794358883 and "recent HEAD" is
 7097f94df0c6667be2343306ffcda152fa22abcf.

 Allocations:

 1. Before the offending patch: 13,445,819,064
 2. After the offending patch: 135,653,550,528 (10x worse)
 3. Recent HEAD: 71,354,312,480 (~5x worse)

 Tidy core size (terms)

 1. Before offending: 20,934
 2. After offending: 170,128
 3. Recent HEAD: 170,023

 Maximum reported core size (terms) before Tidy Core:

 1. Before offending: 45,213
 2. After offending: 1,358,264
 3. Recent HEAD: 503,803

 So we are clearly generating ''far'' more code, and while we eliminate a
 lot of it, we're still left with an awful lot.

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


More information about the ghc-tickets mailing list