Commit 378c49fa authored by Bodigrim's avatar Bodigrim
Browse files

Use ByteString builder without intermediate blaze-builder

parent b62314eb
...@@ -13,8 +13,7 @@ import Test.Tasty.Bench (Benchmark, bgroup, bench, nf) ...@@ -13,8 +13,7 @@ import Test.Tasty.Bench (Benchmark, bgroup, bench, nf)
import Data.Binary.Builder as B import Data.Binary.Builder as B
import Data.ByteString.Char8 () import Data.ByteString.Char8 ()
import Data.Monoid (mconcat, mempty) import Data.Monoid (mconcat, mempty)
import qualified Blaze.ByteString.Builder as Blaze import qualified Data.ByteString.Builder as Blaze
import qualified Blaze.ByteString.Builder.Char.Utf8 as Blaze
import qualified Data.ByteString as SB import qualified Data.ByteString as SB
import qualified Data.ByteString.Lazy as LB import qualified Data.ByteString.Lazy as LB
import qualified Data.Text as T import qualified Data.Text as T
...@@ -32,7 +31,7 @@ benchmark = bgroup "Builder" ...@@ -32,7 +31,7 @@ benchmark = bgroup "Builder"
(LB.length . B.toLazyByteString . mconcat . map B.fromByteString) (LB.length . B.toLazyByteString . mconcat . map B.fromByteString)
byteStrings byteStrings
, bench "Blaze" $ nf , bench "Blaze" $ nf
(LB.length . Blaze.toLazyByteString . mconcat . map Blaze.fromString) (LB.length . Blaze.toLazyByteString . mconcat . map Blaze.stringUtf8)
strings strings
] ]
, bgroup "Int" , bgroup "Int"
......
...@@ -39,7 +39,6 @@ benchmark text-benchmarks ...@@ -39,7 +39,6 @@ benchmark text-benchmarks
build-depends: array, build-depends: array,
base == 4.*, base == 4.*,
binary, binary,
blaze-builder,
bytestring-lexing >= 0.5.0, bytestring-lexing >= 0.5.0,
containers, containers,
tasty-bench >= 0.2, tasty-bench >= 0.2,
......
Supports Markdown
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