Commits

Bryan O'Sullivan  committed 0d70469

Check performance of old UTF-8 encoders

  • Participants
  • Parent commits 0131fdf

Comments (0)

Files changed (1)

File tests/benchmarks/EncodeUtf8.hs

   let t = TL.replicate (fromIntegral k) (TL.pack s)
   BL.putStr (TL.encodeUtf8 t)
 
+strict_bytestring_ k s = do
+  let t = T.replicate k (T.pack s)
+  B.putStr (T.encodeUtf8' t)
+
+lazy_bytestring_ k s = do
+  let t = TL.replicate (fromIntegral k) (TL.pack s)
+  BL.putStr (TL.encodeUtf8' t)
+
 strict_io k s = do
   let t = T.replicate k (T.pack s)
   hSetEncoding stdout utf8
   case kind of
     "strict" -> strict_bytestring k str
     "lazy" -> lazy_bytestring k str
+    "strict_" -> strict_bytestring_ k str
+    "lazy_" -> lazy_bytestring_ k str
     "strict_io" -> strict_io k str
     "lazy_io" -> lazy_io k str
     "string" -> string k str