[GHC] #7994: Make foldl into a good consumer

GHC ghc-devs at haskell.org
Thu Jan 30 11:54:30 UTC 2014


#7994: Make foldl into a good consumer
-------------------------------------+------------------------------------
        Reporter:  simonpj           |            Owner:
            Type:  bug               |           Status:  new
        Priority:  normal            |        Milestone:
       Component:  Compiler          |          Version:  7.6.3
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by nomeata):

 Previously I said that my analysis makes no change in nofib if one does
 not also change `foldl` to use `foldr`. That is not true anymore with the
 latest code (but almost so), there are a few allocation improvemts, up to
 `-1.3%` (in `anna`, stemming from `take 30 [... | ...]`) – not a surprise,
 `take` is defined with a continuation passing `takeFB :: (a -> b -> b) ->
 b -> a -> (Int# -> b) -> Int# -> b`.

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


More information about the ghc-tickets mailing list