[GHC] #10260: last uses too much space with optimizations disabled

GHC ghc-devs at haskell.org
Fri Apr 24 09:15:04 UTC 2015


#10260: last uses too much space with optimizations disabled
-------------------------------------+-------------------------------------
        Reporter:  rwbarton          |                   Owner:  nomeata
            Type:  bug               |                  Status:  patch
        Priority:  normal            |               Milestone:
       Component:  Core Libraries    |                 Version:  7.10.1
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:  Phab:D847
-------------------------------------+-------------------------------------

Comment (by Joachim Breitner <mail@…>):

 In [changeset:"524ddbdad5816f77b7b719cac0671eebd3473616/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="524ddbdad5816f77b7b719cac0671eebd3473616"
 Make sure GHC.List.last is memory-efficient

 by eta-expanding its definition so that GHC optmizes the foldl here.
 Also make sure that other uses of last go via foldl as well, to allow
 list fusion (tested in T9339). Fixes #10260.
 }}}

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


More information about the ghc-tickets mailing list