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