[GHC] #9345: Data.List.inits is extremely slow

GHC ghc-devs at haskell.org
Tue Jul 22 07:17:53 UTC 2014


#9345: Data.List.inits is extremely slow
-------------------------------------+-------------------------------------
              Reporter:  dfeuer      |             Owner:
                  Type:  bug         |            Status:  new
              Priority:  normal      |         Milestone:
             Component:              |           Version:  7.8.3
  libraries/base                     |          Keywords:
            Resolution:              |  Operating System:  Unknown/Multiple
Differential Revisions:              |   Type of failure:  Runtime
          Architecture:              |  performance bug
  Unknown/Multiple                   |         Test Case:
            Difficulty:  Easy (less  |          Blocking:
  than 1 hour)                       |
            Blocked By:              |
       Related Tickets:              |
-------------------------------------+-------------------------------------

Comment (by nomeata):

 Interesting. Can you elaborate (just for the record here) when `initsQ` is
 faster?

 I would find it strange to add such complexity “just for” `inits`. Now, if
 we had such a `Queue` type (which looks useful in general) in base
 anyways, using it would be a different story...

 How is the performance when the existing `Seq` is used instead of `Queue`?

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


More information about the ghc-tickets mailing list