on master help sign in
Reclassify concatPairWith benchmarks under o-n-space
c3620cfAdithya Kumar
benchmark/Streamly/Benchmark/Prelude/Serial/NestedStream.hs+13−1
@@ -303,11 +303,22 @@ o_1_space_concat value = sqrtVal `seq`
303 (concatMapRepl sqrtVal sqrtVal)
303 (concatMapRepl sqrtVal sqrtVal)
304 , benchIOSrc1 "unfoldManyRepl (sqrt n of sqrt n)"
304 , benchIOSrc1 "unfoldManyRepl (sqrt n of sqrt n)"
305 (unfoldManyRepl sqrtVal sqrtVal)
305 (unfoldManyRepl sqrtVal sqrtVal)
306+ ]
307+ ]
308+
309+ where
306
310
311+ sqrtVal = round $ sqrt (fromIntegral value :: Double)
312+
313+o_n_space_concat :: Int -> [Benchmark]
314+o_n_space_concat value = sqrtVal `seq`
315+ [ bgroup "concat"
316+ [
307 -------------------concatPairsWith-----------------
317 -------------------concatPairsWith-----------------
308
318
309 -- Use large number of streams to check scalability
319 -- Use large number of streams to check scalability
320+
310− , benchIOSrc1 "concatPairWithSerial (n of 1)"
321+ benchIOSrc1 "concatPairWithSerial (n of 1)"
311 (concatPairWithSerial value 1)
322 (concatPairWithSerial value 1)
312 , benchIOSrc1 "concatPairWithSerial (sqrtVal of sqrtVal)"
323 , benchIOSrc1 "concatPairWithSerial (sqrtVal of sqrtVal)"
313 (concatPairWithSerial sqrtVal sqrtVal)
324 (concatPairWithSerial sqrtVal sqrtVal)
@@ -427,5 +438,6 @@ benchmarks moduleName size =
427 -- multi-stream
438 -- multi-stream
428 o_n_space_applicative size
439 o_n_space_applicative size
429 , o_n_space_monad size
440 , o_n_space_monad size
441+ , o_n_space_concat size
430 ]
442 ]
431 ]
443 ]