[commit: ghc] wip/T12357: Revert "FastString: Reduce allocations of concatFS" (cdd1889)

git at git.haskell.org git at git.haskell.org
Tue Jul 5 07:48:26 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T12357
Link       : http://ghc.haskell.org/trac/ghc/changeset/cdd1889903b6dd453acddeb1f9a741e21a4c5e51/ghc

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

commit cdd1889903b6dd453acddeb1f9a741e21a4c5e51
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Mon Jul 4 21:13:42 2016 -0400

    Revert "FastString: Reduce allocations of concatFS"
    
    This reverts commit e3db922012d73a29e6574e35b2e20f7285f4c550.
    This didn't seem to help, need to work out why.


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

cdd1889903b6dd453acddeb1f9a741e21a4c5e51
 compiler/utils/FastString.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/utils/FastString.hs b/compiler/utils/FastString.hs
index 7f29eee..211d503 100644
--- a/compiler/utils/FastString.hs
+++ b/compiler/utils/FastString.hs
@@ -518,7 +518,7 @@ appendFS fs1 fs2 = mkFastStringByteString
                              (fastStringToByteString fs2)
 
 concatFS :: [FastString] -> FastString
-concatFS = mkFastStringByteString . BS.concat . map fs_bs
+concatFS ls = mkFastString (Prelude.concat (map unpackFS ls)) -- ToDo: do better
 
 headFS :: FastString -> Char
 headFS (FastString _ 0 _ _) = panic "headFS: Empty FastString"



More information about the ghc-commits mailing list