@@ -12,7 +12,7 @@ module Benchmarks.Builder
1212import Criterion (Benchmark, bgroup, bench, nf)
1313import Data.Binary.Builder as B
1414import Data.ByteString.Char8 ()
15−import Data.Monoid (mconcat)
15+import Data.Monoid (mconcat, mempty)
1616import qualified Blaze.ByteString.Builder as Blaze
1717import qualified Blaze.ByteString.Builder.Char.Utf8 as Blaze
1818import qualified Data.ByteString as SB
@@ -44,6 +44,10 @@ benchmark = return $ bgroup "Builder"
4444 flip map numbers $ \m ->
4545 let n = negate m in
4646 (bench (show (length (show n))) $ nf (LTB.toLazyText . Int.decimal) n)
47+ , bench "Empty" $ nf LTB.toLazyText mempty
48+ , bgroup "Show" .
49+ flip map numbers $ \n ->
50+ (bench (show (length (show n))) $ nf show n)
4751 ]
4852 ]
4953 ]