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

GHC ghc-devs at haskell.org
Sun Jun 8 09:27:05 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 skeuchel):

 Hi @Blaisorblade @nomeata,

 I took the changes from your branch and added a test case for this.
 However, it causes a 3.9% regression in terms of allocation of the rewrite
 test in nofib. This occurrence of takeWhile
 [https://github.com/ghc/nofib/blob/master/spectral/rewrite/Main.lhs#L193]
 is rewritten to takeWhileFB and then later written back without being
 fused. However, it seems to change the inline cost of string_of which will
 result that it will be inlined later and ultimately this results in losing
 sharing in one case. See this diff
 [http://lpaste.net/105275]
 of the output of the inliner/rewriter for some more details. You can
 clearly see the duplicated let bindings in the core output.

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


More information about the ghc-tickets mailing list