[GHC] #12545: Compilation time/space regression in GHC 8.0/8.1 (search in type-level lists and -O)

GHC ghc-devs at haskell.org
Fri Jun 2 18:02:15 UTC 2017


#12545: Compilation time/space regression in GHC 8.0/8.1 (search in type-level
lists and -O)
-------------------------------------+-------------------------------------
        Reporter:                    |                Owner:  (none)
  mikhail.vorozhtsov                 |
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:  Inlining
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 Ben Gamari <ben@…>):

 In [changeset:"a786b136f48dfcf907dad55bcdbc4fcd247f2794/ghc"
 a786b136/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="a786b136f48dfcf907dad55bcdbc4fcd247f2794"
 Use lengthIs and friends in more places

 While investigating #12545, I discovered several places in the code
 that performed length-checks like so:

 ```
 length ts == 4
 ```

 This is not ideal, since the length of `ts` could be much longer than 4,
 and we'd be doing way more work than necessary! There are already a slew
 of helper functions in `Util` such as `lengthIs` that are designed to do
 this efficiently, so I found every place where they ought to be used and
 did just that. I also defined a couple more utility functions for list
 length that were common patterns (e.g., `ltLength`).

 Test Plan: ./validate

 Reviewers: austin, hvr, goldfire, bgamari, simonmar

 Reviewed By: bgamari, simonmar

 Subscribers: goldfire, rwbarton, thomie

 Differential Revision: https://phabricator.haskell.org/D3622
 }}}

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


More information about the ghc-tickets mailing list