[GHC] #9676: Data.List.isSuffixOf can be very inefficient

GHC ghc-devs at haskell.org
Mon Oct 27 21:15:06 UTC 2014


#9676: Data.List.isSuffixOf can be very inefficient
-------------------------------------+-------------------------------------
              Reporter:  dfeuer      |            Owner:  ekmett
                  Type:  bug         |           Status:  patch
              Priority:  normal      |        Milestone:  7.10.1
             Component:  Core        |          Version:  7.8.3
  Libraries                          |         Keywords:
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Easy (less than 1
  Unknown/Multiple                   |  hour)
       Type of failure:  Runtime     |       Blocked By:
  performance bug                    |  Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:  Phab:D330   |
-------------------------------------+-------------------------------------

Comment (by Herbert Valerio Riedel <hvr@…>):

 In [changeset:"49b05d6935b6677443a970a45138def66c6f8cee/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="49b05d6935b6677443a970a45138def66c6f8cee"
 Improve performance of isSuffixOf (#9676)

 The new implementation avoids reversing the "haystack" list, which can be
 very expensive.

 Reviewed By: ekmett

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

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


More information about the ghc-tickets mailing list