[GHC] #9132: takeWhile&C. still not fusible

GHC ghc-devs at haskell.org
Sun Jun 8 07:55:46 UTC 2014


#9132: takeWhile&C. still not fusible
-------------------------------------+-------------------------------------
        Reporter:  Blaisorblade      |            Owner:  skeuchel
            Type:  bug               |           Status:  new
        Priority:  normal            |        Milestone:
       Component:  libraries/base    |          Version:  7.8.2
      Resolution:                    |         Keywords:  fusion
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  Runtime           |       Difficulty:  Moderate (less
  performance bug                    |  than a day)
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+-------------------------------------

Comment (by nomeata):

 @skeuchel:

 Good work so far¹. I think you can also do this for `dropWhile`. It’s true
 that `dropWhile` does not perform allocation on its own, but if you have
 `sum $ dropWhile (<100) [0..1000]`, there is value in fusing this:
 `dropWhile` needs to be a good consumer to avoid the allocations in the
 producer. And once that has been fused, the result is allocating, so
 `dropWhile` also should be a good producer.

 ¹ [private communication]

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


More information about the ghc-tickets mailing list