Commits

Bryan O'Sullivan  committed a333943 Merge

Merge

  • Participants
  • Parent commits 133262d, 4447e56

Comments (0)

Files changed (3)

 784a32ffbec0b77adb43e9a64328db0482007309 0.11.0.6
 c808123a3d37f25004d2aad8f3a395acfcf9122f 0.11.0.7
 679826e742b239c5dd0c1fa4ebe98aa4bfe02a00 0.11.0.8
+b49eebfa5673da89a23939d523c9de9edbd410b0 0.11.1.0
+9c820a2ecaea01bc614d8e6bccf90e57431bdcbb 0.11.1.1

File tests/benchmarks/src/Data/Text/Benchmarks/Equality.hs

 benchmark :: FilePath -> IO Benchmark
 benchmark fp = do
   b <- B.readFile fp
-  bl <- BL.readFile fp
+  bl1 <- BL.readFile fp
+  -- A lazy bytestring is a list of chunks. When we do not explicitly create two
+  -- different lazy bytestrings at a different address, the bytestring library
+  -- will compare the chunk addresses instead of the chunk contents. This is why
+  -- we read the lazy bytestring twice here.
+  bl2 <- BL.readFile fp
   l <- readFile fp
   let t  = T.decodeUtf8 b
-      tl = TL.decodeUtf8 bl
+      tl = TL.decodeUtf8 bl1
   return $ bgroup "Equality"
     [ bench "Text" $ whnf (== T.init t `T.snoc` '\xfffd') t
     , bench "LazyText" $ whnf (== TL.init tl `TL.snoc` '\xfffd') tl
     , bench "ByteString" $ whnf (== B.init b `B.snoc` '\xfffd') b
-    , bench "LazyByteString" $ whnf (== BL.init bl `BL.snoc` '\xfffd') bl
+    , bench "LazyByteString" $ whnf (== BL.init bl2 `BL.snoc` '\xfffd') bl1
     , bench "String" $ whnf (== init l ++ "\xfffd") l
     ]
 name:           text
-version:        0.11.1.0
+version:        0.11.1.1
 homepage:       https://bitbucket.org/bos/text
 bug-reports:    https://bitbucket.org/bos/text/issues
 synopsis:       An efficient packed Unicode text type.
     README.markdown
     -- scripts/CaseFolding.txt
     -- scripts/SpecialCasing.txt
-    scripts/ApiCompare.hs
-    scripts/Arsec.hs
-    scripts/CaseFolding.hs
-    scripts/CaseMapping.hs
-    scripts/SpecialCasing.hs
-    tests/Benchmarks.hs
+    scripts/*.hs
+    tests/*.hs
     tests/Makefile
-    tests/Properties.hs
-    tests/QuickCheckUtils.hs
-    tests/SlowFunctions.hs
-    tests/StdioCoverage.hs
-    tests/TestUtils.hs
-    tests/benchmarks/Cut.hs
-    tests/benchmarks/DecodeUtf8.hs
-    tests/benchmarks/EncodeUtf8.hs
-    tests/benchmarks/Equality.hs
-    tests/benchmarks/FileIndices.hs
-    tests/benchmarks/FileRead.hs
-    tests/benchmarks/FoldLines.hs
-    tests/benchmarks/HtmlCombinator.hs
-    tests/benchmarks/Makefile
-    tests/benchmarks/Replace.hs
-    tests/benchmarks/ReplaceTags.hs
-    tests/benchmarks/fileread.py
-    tests/benchmarks/fileread_c.c
+    tests/README.markdown
+    tests/benchmarks/Setup.hs
+    tests/benchmarks/python/*.py
+    tests/benchmarks/ruby/*.rb
+    tests/benchmarks/src/Data/Text/*.hs
+    tests/benchmarks/src/Data/Text/Benchmarks/*.hs
+    tests/benchmarks/text-benchmarks.cabal
     tests/cover-stdio.sh
 
 flag developer
     Data.Text.Fusion.Size
     Data.Text.IO.Internal
     Data.Text.Lazy.Builder.Functions
+    Data.Text.Lazy.Builder.RealFloat.Functions
     Data.Text.Lazy.Encoding.Fusion
     Data.Text.Lazy.Fusion
     Data.Text.Lazy.Search