[GHC] #9369: Data.List.unfoldr does not fuse and is not inlined.

GHC ghc-devs at haskell.org
Sun Jul 27 21:01:46 UTC 2014


#9369: Data.List.unfoldr does not fuse and is not inlined.
-------------------------------------+-------------------------------------
              Reporter:  dfeuer      |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  normal      |        Milestone:  7.8.4
             Component:              |          Version:  7.8.3
  libraries/base                     |         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:              |
-------------------------------------+-------------------------------------

Comment (by dfeuer):

 Replying to [comment:1 schyler]:
 > (By the way, I don't think this counts as a 'Runtime performance bug' as
 much as it should be categorised as a 'Compile-time performance bug'
 maybe..)
 >
 > Good work though, +1 from me.

 My interpretation, correct or not, is that compile-time performance bugs
 are things that lead to GHC itself running slowly.

 As long as I'm adding a comment, I'll note that there are functions in the
 libraries that are very naturally written as unfolds, but that currently
 are not—perhaps because the current unfold performs so poorly. The ones
 I've encountered so far are `groupBy` and various implementations of
 `enumFromTo` that have their own custom rewrite rules to get around this.
 I can't guarantee anything, but it would be nice to simplify those if we
 can do so without losing speed.

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


More information about the ghc-tickets mailing list