[GHC] #9669: Long compile time/high memory usage for modules with many deriving clauses

GHC ghc-devs at haskell.org
Wed Jul 8 23:57:45 UTC 2015


#9669: Long compile time/high memory usage for modules with many deriving clauses
-------------------------------------+-------------------------------------
        Reporter:  snoyberg          |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.8.3
      Resolution:                    |                Keywords:
Operating System:  Linux             |            Architecture:  x86_64
 Type of failure:  Compile-time      |  (amd64)
  performance bug                    |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:  #75               |  Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by bgamari):

 * related:   => #75


Comment:

 I suspect this will be positively affected by my recent work on #7450
 (which focussed on compile time of datatypes with large numbers of
 constructors). This work has thusfar produced two fixes (Phab:D1012 and
 Phab:D1041). Let's characterize their effect on this and a couple of other
 related testcases with 7.11.

 This test will start with 7a3d85e705665fbf2c28f83bb3997e8979f2b88c, the
 parent commit of the merge of D1012
 (4681f55970cabc6e33591d7e698621580818f9a2), as the base commit. I will
 also test D1041 (which I have yet to land) applied directly on top of
 this.

 I will look at the "maximum residency", "MUT time", "Total time", and
 "allocated in the heap" statistics from `+RTS -s`.

 ||= testcase =||= commit      =||= max residency =||= MUT time =||= total
 time =||= allocated =||
 ||= T9669    =|| base commit   || 410 MB          || 46.0 s     || 79.4 s
 || 81.0 GB     ||
 ||            || + D1012       || 438 MB          || 46.0 s     || 79.7 s
 || 80.9 GB     ||
 ||            || + D1041       || 438 MB          || 46.2 s     || 79.9 s
 || 80.8 GB     ||
 ||= T7450    =|| base commit   || 404 MB          || 35.5 s     || 48.4 s
 || 61.0 GB     ||
 ||            || + D1012       || 460 MB          || 23.0 s     || 35.0 s
 || 38.3 GB     ||
 ||            || + D1041       || 438 MB          || 22.3 s     || 35.0 s
 || 37.0 GB     ||
 ||= T7450-2k =|| base commit   || 919 MB          || 112.1 s    || 140.0 s
 || 191.5 GB    ||
 ||            || + D1012       || 961 MB          || 57.7 s     || 84.1 s
 || 102.0 GB    ||
 ||            || + D1041       || 986 MB          || 54.6 s     || 82.1 s
 || 91.9 GB     ||
 ||= T7450-4k =|| base commit   || not tested      ||            ||
 ||             ||
 ||            || + D1012       || 2.4 GB          || 174.0 s    || 235.0 s
 || 338.3 GB    ||
 ||            || + D1041       || 1.9 GB          || 158.8 s    || 219.3 s
 || 254.5 GB    ||
 ||= T7258    =|| base commit   || 191 MB          || 30.5 s     || 42.0 s
 || 49.5 GB     ||
 ||            || + D1012       || 171 MB          || 31.4 s     || 41.3 s
 || 49.5 GB     ||
 ||            || + D1041       || 179 MB          || 31.2 s     || 43.0 s
 || 49.5 GB     ||

 Here the `T9696` testcase refers to the `Bar.hs` produced by `generate.hs`
 on this ticket. The `T7258` case is the `W2.hs` on #7458 which features a
 large number of fields in a single record constructor. The `T7450` case
 refers to program like that described in #7450(comment:18) defining a
 single type with 1024 constructors deriving `Read`. The `T7450-2k` case is
 identical to `T7450` but with 2096 constructors. `T7450-4k` is again
 identical but with 4096 constructors.

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


More information about the ghc-tickets mailing list