[GHC] #11095: -O0 -g slows GHC down on list literals (compared to -O0 without -g)

GHC ghc-devs at haskell.org
Sat Feb 4 23:08:25 UTC 2017


#11095: -O0 -g slows GHC down on list literals (compared to -O0 without -g)
-------------------------------------+-------------------------------------
        Reporter:  slyfox            |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       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 Rev(s):  phab:D3001
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"29122312cc7b8f9890eb53f92d76ecdd8ded24ee/ghc" 2912231/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="29122312cc7b8f9890eb53f92d76ecdd8ded24ee"
 Improve wrapTicks performance with lots of redundant source notes

 The old version had O(n^3) performance for n non-overlapping source
 notes and let floats each, which is exactly what happens with -g if we
 compile a list literal of length n.

 The idea here is simply to establish early which source notes will
 actually survive (e.g. use a left fold). The new code should be O(n) for
 list literals.

 Reviewers: austin, dfeuer, bgamari

 Reviewed By: bgamari

 Subscribers: thomie

 Differential Revision: https://phabricator.haskell.org/D3037

 GHC Trac Issues: #11095
 }}}

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


More information about the ghc-tickets mailing list