@@ -20,12 +20,14 @@ import qualified Streamly.Benchmark.Prelude as Ops
2020
2121import Streamly
2222import qualified Streamly.Data.Fold as FL
23−import qualified Streamly.Internal.Data.Fold.Types as IFL
24−import qualified Streamly.Internal.Prelude as IP
25−--import qualified Streamly.Internal.Data.Pipe as Pipe
2623import qualified Streamly.Memory.Array as A
2724import qualified Streamly.Prelude as S
28−-- import qualified Streamly.Internal.Data.Sink as Sink
25+import qualified Streamly.Internal.Data.Sink as Sink
26+
27+import qualified Streamly.Internal.Data.Fold as IFL
28+import qualified Streamly.Internal.Prelude as IP
29+import qualified Streamly.Internal.Data.Pipe as Pipe
30+
2931import Gauge
3032
3133-------------------------------------------------------------------------------
@@ -218,7 +220,7 @@ main =
218220 ]
219221 , bgroup "folds"
220222 [ benchIOSink "drain" (S.runFold FL.drain)
221− -- , benchIOSink "sink" (Sink.sink Sink.drain)
223+ , benchIOSink "sink" (S.runFold $ Sink.toFold Sink.drain)
222224 , benchIOSink "last" (S.runFold FL.last)
223225 , benchIOSink "length" (S.runFold FL.length)
224226 , benchIOSink "sum" (S.runFold FL.sum)
@@ -264,15 +266,15 @@ main =
264266 , bgroup "folds-transforms"
265267 [ benchIOSink "drain" (S.runFold FL.drain)
266268 , benchIOSink "lmap" (S.runFold (IFL.lmap (+1) FL.drain))
267− {-, benchIOSink "pipe-mapM"
268− (S.runFold (FL.transform (Pipe.mapM (\x -> return $ x + 1)) FL.drain))-}
269+ , benchIOSink "pipe-mapM"
270+ (S.runFold (IFL.transform (Pipe.mapM (\x -> return $ x + 1)) FL.drain))
269271 ]
270272 , bgroup "folds-compositions" -- Applicative
271273 [
272274 benchIOSink "all,any" (S.runFold ((,) <$> FL.all (<= Ops.maxValue)
273275 <*> FL.any (> Ops.maxValue)))
274276 , benchIOSink "sum,length" (S.runFold ((,) <$> FL.sum <*> FL.length))
275− ] {-
277+ ]
276278 , bgroup "pipes"
277279 [ benchIOSink "mapM" (Ops.transformMapM serially 1)
278280 , benchIOSink "compose" (Ops.transformComposeMapM serially 1)
@@ -284,7 +286,7 @@ main =
284286 , benchIOSink "compose" (Ops.transformComposeMapM serially 4)
285287 , benchIOSink "tee" (Ops.transformTeeMapM serially 4)
286288 , benchIOSink "zip" (Ops.transformZipMapM serially 4)
287− ] -}
289+ ]
288290 , bgroup "transformation"
289291 [ benchIOSink "scanl" (Ops.scan 1)
290292 , benchIOSink "scanl1'" (Ops.scanl1' 1)