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

GHC ghc-devs at haskell.org
Mon Sep 8 16:23:48 UTC 2014


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

Comment (by dfeuer):

 Replying to [comment:9 nomeata]:
 > Small followup: According to http://ghcspeed-
 nomeata.rhcloud.com/changes/?rev=78209d70596dcbfcb11ad1de1c961ab8479e531e&exe=2&env=nomeata%27s%20buildbot
 no significant changes in performance can be observed.

 The reason for this is very simple: not a single one of those benchmarks
 uses `unfoldr` anywhere. The only benchmarks in the `nofib` tree that use
 it are the `fibon` ones, which are not run by default:

 {{{
 [dfeuer at lemur nofib]$ find . -name "*hs" -exec grep unfoldr \{\} \; -print

 split n xs = unfoldr (g n) xs
 ./fibon/Hackage/Crypto/Codec/Text/Raw.hs
       blocks = map (fromOctets 256) (unfoldr h $ concat $ unfoldr g s)
    concat $ unfoldr g s where
 ./fibon/Hackage/Crypto/Codec/Encryption/Padding.hs
 import Data.List(unfoldr)
    unfoldr f $ md5s $ Str $ map (chr . fromIntegral) xs
 ./fibon/Hackage/Crypto/Data/Digest/MD5.hs
    unfoldr g
    unfoldr g
 ./fibon/Hackage/Crypto/Data/Digest/SHA1.hs
 padding x = unfoldr block $ paddingHelper x 0 (0::Int) (0::Integer)
 ./fibon/Hackage/Crypto/Data/Digest/SHA2.hs
 import Data.List    (unfoldr)
 unroll = unfoldr step
 ./fibon/Hackage/Gf/src/runtime/haskell/Data/Binary.hs
 }}}

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


More information about the ghc-tickets mailing list