@@ -16,9 +16,9 @@ import Streamly.Internal.Data.Unfold (Unfold)
1616import qualified Prelude
1717import qualified Streamly.Internal.Data.Fold as FL
1818import qualified Streamly.Internal.Data.Unfold as UF
19+import qualified Streamly.Benchmark.Data.NestedUnfoldOps as Nested
1920
2021import Streamly.Benchmark.Common
21−import Streamly.Benchmark.Data.NestedUnfoldOps
2222import Gauge
2323import Prelude hiding (concat, take)
2424
@@ -160,8 +160,8 @@ zipWithM size start =
160160moduleName :: String
161161moduleName = "Data.Unfold"
162162
163−o_1_space_serial_generation :: Int -> [Benchmark]
164−o_1_space_serial_generation size =
163+o_1_space_generation :: Int -> [Benchmark]
164+o_1_space_generation size =
165165 [ bgroup "generation"
166166 [ benchIO "fromListM" $ fromListM size
167167 , benchIO "replicateM" $ replicateM size
@@ -171,14 +171,11 @@ o_1_space_serial_generation size =
171171 ]
172172 ]
173173
174−o_1_space_serial_transformation :: Int -> [Benchmark]
175−o_1_space_serial_transformation size =
174+o_1_space_transformation :: Int -> [Benchmark]
175+o_1_space_transformation size =
176176 [ bgroup "transformation"
177177 [ benchIO "take" $ take size
178178 , benchIO "takeWhileM" $ takeWhileM size
179− , benchIO "filterAllOut" $ filterAllOut size
180− , benchIO "filterAllIn" $ filterAllIn size
181− , benchIO "filterSome" $ filterSome size
182179 -- This will take nanoseconds, We need to fix the benchmark reporting to
183180 -- have microseconds as the minimum unit before uncommenting this.
184181 -- , benchIO "dropOne" $ dropOne size
@@ -188,28 +185,31 @@ o_1_space_serial_transformation size =
188185 ]
189186 ]
190187
191−o_1_space_serial_combination :: Int -> [Benchmark]
192−o_1_space_serial_combination size =
188+o_1_space_combination :: Int -> [Benchmark]
189+o_1_space_combination size =
193190 [ bgroup "combination"
194191 [ benchIO "zipWithM" $ zipWithM size
195192 ]
196193 ]
197194
198−o_1_space_serial_outerProduct :: Int -> [Benchmark]
199−o_1_space_serial_outerProduct size =
195+o_1_space_nested :: Int -> [Benchmark]
196+o_1_space_nested size =
200197 [ bgroup "outer-product"
201− [ benchIO "toNull" $ toNull size
202− , benchIO "toNull3" $ toNull3 size
203− , benchIO "concat" $ concat size
204− , benchIO "breakAfterSome" $ breakAfterSome size
198+ [ benchIO "toNull" $ Nested.toNull size
199+ , benchIO "toNull3" $ Nested.toNull3 size
200+ , benchIO "concat" $ Nested.concat size
201+ , benchIO "breakAfterSome" $ Nested.breakAfterSome size
202+ , benchIO "filterAllOut" $ Nested.filterAllOut size
203+ , benchIO "filterAllIn" $ Nested.filterAllIn size
204+ , benchIO "filterSome" $ Nested.filterSome size
205205 ]
206206 ]
207207
208−o_n_space_serial :: Int -> [Benchmark]
209−o_n_space_serial size =
208+o_n_space_nested :: Int -> [Benchmark]
209+o_n_space_nested size =
210210 [ bgroup "outer-product"
211− [ benchIO "toList" $ toList size
212− , benchIO "toListSome" $ toListSome size
211+ [ benchIO "toList" $ Nested.toList size
212+ , benchIO "toListSome" $ Nested.toListSome size
213213 ]
214214 ]
215215
@@ -227,11 +227,11 @@ main = do
227227 allBenchmarks size =
228228 [ bgroup (o_1_space_prefix moduleName)
229229 $ Prelude.concat
230− [ o_1_space_serial_generation size
231− , o_1_space_serial_transformation size
232− , o_1_space_serial_combination size
233− , o_1_space_serial_outerProduct size
230+ [ o_1_space_generation size
231+ , o_1_space_transformation size
232+ , o_1_space_combination size
233+ , o_1_space_nested size
234234 ]
235235 , bgroup (o_n_space_prefix moduleName)
236− $ Prelude.concat [o_n_space_serial size]
236+ $ Prelude.concat [o_n_space_nested size]
237237 ]