[commit: containers] master: Once again revert argument capturing by local 'go' function. (cf2cdd5)

Paolo Capriotti <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.libraries
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/packages/containers

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/cf2cdd50743f540c0781a6f1455cebec9a6042d1

>---------------------------------------------------------------

commit cf2cdd50743f540c0781a6f1455cebec9a6042d1
Author: Milan Straka <[email protected]>
Date:   Fri Apr 27 11:12:07 2012 +0200

    Once again revert argument capturing by local 'go' function.
    
    At last I found an example, where capturing the argument in local 'go'
    function in 'member' causes increased heap-allocation. It is caused by
    'go' function floating out of 'member' and allocating a dictionary and
    the key argument.
    
    This happens only with Map and Set methods. Therefore in IntMap and IntSet,
    'go' function still captures the argument (and GHC shows no increased
    heap-allocation as a result of that).

 Data/Map/Base.hs |  180 +++++++++++++++++++++++++++++++----------------------
 Data/Set/Base.hs |  120 +++++++++++++++++++++---------------
 2 files changed, 176 insertions(+), 124 deletions(-)


Diff suppressed because of size. To see it, use:

    git show cf2cdd50743f540c0781a6f1455cebec9a6042d1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.