@@ -22,6 +22,7 @@
2222#endif
2323
2424module Streamly.Benchmark.Prelude
25+ -- TODO: export a single bench group for o_1_space_serial
2526 ( o_1_space_serial_pure
2627 , o_1_space_serial_foldable
2728 , o_1_space_serial_generation
@@ -82,6 +83,7 @@ module Streamly.Benchmark.Prelude
8283
8384 , o_1_space_async_zip
8485
86+ -- TODO: rename to o_n_*
8587 , o_1_space_parallel_generation
8688 , o_1_space_parallel_concatFoldable
8789 , o_1_space_parallel_concatMap
@@ -119,25 +121,7 @@ import Test.Inspection
119121import qualified Streamly.Internal.Data.Stream.StreamD as D
120122#endif
121123
122−import Streamly
123− ( IsStream
124− , SerialT
125− , aheadly
126− , asyncly
127− , serially
128− , parallely
129− , wAsyncly
130− , wSerially
131− , zipSerially
132− , ahead
133− , async
134− , wAsync
135− , parallel
136− , maxBuffer
137− , maxThreads
138− )
139−
140−import qualified Streamly as S hiding (runStream)
124+import qualified Streamly as S hiding (runStream)
141125import qualified Streamly.Prelude as S
142126import qualified Streamly.Internal.Prelude as Internal
143127import qualified Streamly.Internal.Data.Fold as FL
@@ -157,9 +141,9 @@ import qualified NestedOps as Nested
157141import qualified NestedUnfoldOps as NestedUnfold
158142
159143import Gauge
144+import Streamly hiding (runStream)
160145import Streamly.Benchmark.Common
161146
162−
163147type Stream m a = S.SerialT m a
164148
165149-------------------------------------------------------------------------------
@@ -1894,7 +1878,6 @@ o_1_space_serial_filteringX4 value =
18941878 ]
18951879 ]
18961880
1897−
18981881o_1_space_serial_joining :: Int -> [Benchmark]
18991882o_1_space_serial_joining value =
19001883 [ bgroup
@@ -1915,7 +1898,6 @@ o_1_space_serial_joining value =
19151898 ]
19161899 ]
19171900
1918−
19191901o_1_space_serial_concatFoldable :: Int -> [Benchmark]
19201902o_1_space_serial_concatFoldable value =
19211903 [ bgroup
@@ -1973,7 +1955,6 @@ o_1_space_serial_concatSerial value =
19731955 ]
19741956 ]
19751957
1976−
19771958o_1_space_serial_outerProductStreams :: Int -> [Benchmark]
19781959o_1_space_serial_outerProductStreams value =
19791960 [ bgroup
@@ -1992,7 +1973,6 @@ o_1_space_serial_outerProductStreams value =
19921973 ]
19931974 ]
19941975
1995−
19961976o_1_space_serial_outerProductUnfolds :: Int -> [Benchmark]
19971977o_1_space_serial_outerProductUnfolds value =
19981978 [ bgroup
@@ -2010,7 +1990,6 @@ o_1_space_serial_outerProductUnfolds value =
20101990 ]
20111991 ]
20121992
2013−
20141993o_1_space_serial_mixed :: Int -> [Benchmark]
20151994o_1_space_serial_mixed value =
20161995 [ bgroup
@@ -2335,7 +2314,6 @@ o_1_space_async_concatFoldable value =
23352314 ]
23362315 ]
23372316
2338−
23392317o_1_space_async_concatMap :: Int -> [Benchmark]
23402318o_1_space_async_concatMap value =
23412319 value2 `seq`
@@ -2358,7 +2336,6 @@ o_1_space_async_concatMap value =
23582336 where
23592337 value2 = round $ sqrt $ (fromIntegral value :: Double)
23602338
2361−
23622339o_1_space_async_transformation :: Int -> [Benchmark]
23632340o_1_space_async_transformation value =
23642341 [ bgroup
@@ -2437,7 +2414,6 @@ o_1_space_wAsync_concatMap value =
24372414 where
24382415 value2 = round $ sqrt $ (fromIntegral value :: Double)
24392416
2440−
24412417o_1_space_wAsync_transformation :: Int -> [Benchmark]
24422418o_1_space_wAsync_transformation value =
24432419 [ bgroup
@@ -2659,6 +2635,7 @@ o_n_space_parallel_outerProductStreams value =
26592635 ]
26602636 ]
26612637
2638+-- XXX arbitrarily large rate should be the same as rate Nothing
26622639o_1_space_async_avgRate :: Int -> [Benchmark]
26632640o_1_space_async_avgRate value =
26642641 [ bgroup