@@ -0,0 +1,18 @@
1+module Main (main) where
4+import qualified Data.Aeson.Encode.Builder as AB
5+import qualified Data.ByteString.Builder as B
6+import qualified Data.Text as T
11+ let txt = "append (append b (primBounded w1 x1)) (primBounded w2 x2)"
14+ bench "text" $ nf (B.toLazyByteString . AB.text) (T.pack txt)
15+ , bench "string direct" $ nf (B.toLazyByteString . AB.string) txt
16+ , bench "string via text" $ nf (B.toLazyByteString . AB.text . T.pack) txt