Commit 91fd87e2 authored by Ben Gamari's avatar Ben Gamari 🐢
Browse files

FastString: Reduce allocations of concatFS

Instead of unpacking and then repacking we simply concatenate all of the
individual ByteStrings.
parent b8cd94d6
......@@ -512,7 +512,7 @@ appendFS fs1 fs2 = mkFastStringByteString
(fastStringToByteString fs2)
concatFS :: [FastString] -> FastString
concatFS ls = mkFastString (Prelude.concat (map unpackFS ls)) -- ToDo: do better
concatFS = mkFastStringByteString . BS.concat . map fs_bs
headFS :: FastString -> Char
headFS (FastString _ 0 _ _) = panic "headFS: Empty FastString"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment