@@ -45,7 +45,7 @@ _benchId name f = bench name $ nf (runIdentity . f) (Ops.source 10)
47defaultStreamSize :: Int
47defaultStreamSize :: Int
48−defaultStreamSize = 10000
48+defaultStreamSize = 100000
50main :: IO ()
50main :: IO ()
@@ -72,8 +72,8 @@ main = do
72 (Ops.concatStreamsWith async 2 (value `div` 2))
72 (Ops.concatStreamsWith async 2 (value `div` 2))
73 , benchMonadicSrcIO "concatMapWith (sqrt x,sqrt x)"
73 , benchMonadicSrcIO "concatMapWith (sqrt x,sqrt x)"
74 (Ops.concatStreamsWith async value2 value2)
74 (Ops.concatStreamsWith async value2 value2)
75− , benchMonadicSrcIO "concatMapWith (x/2,2)"
75+ , benchMonadicSrcIO "concatMapWith (sqrt x * 2,sqrt x / 2)"
76− (Ops.concatStreamsWith async (value `div` 2) 2)
76+ (Ops.concatStreamsWith async (value2 * 2) (value2 `div` 2))
78 , bgroup "wAsyncly"
78 , bgroup "wAsyncly"
79 [ benchSrcIO wAsyncly "unfoldr" (Ops.sourceUnfoldr value)
79 [ benchSrcIO wAsyncly "unfoldr" (Ops.sourceUnfoldr value)
@@ -102,10 +102,10 @@ main = do
102 (Ops.concatStreamsWith wAsync 2 (value `div` 2))
102 (Ops.concatStreamsWith wAsync 2 (value `div` 2))
103 , benchMonadicSrcIO "concatMapWith (sqrt x,sqrt x)"
103 , benchMonadicSrcIO "concatMapWith (sqrt x,sqrt x)"
104 (Ops.concatStreamsWith wAsync value2 value2)
104 (Ops.concatStreamsWith wAsync value2 value2)
105− , benchMonadicSrcIO "concatMapWith (x/2,2)"
105+ , benchMonadicSrcIO "concatMapWith (sqrt x * 2,sqrt x / 2)"
106− (Ops.concatStreamsWith wAsync (value `div` 2) 2)
106+ (Ops.concatStreamsWith wAsync (value2 * 2) (value2 `div` 2))
108− -- unfoldr and fromFoldable are always serial and thereofore the same for
108+ -- unfoldr and fromFoldable are always serial and therefore the same for
109 -- all stream types.
109 -- all stream types.
110 , bgroup "aheadly"
110 , bgroup "aheadly"
111 [ benchSrcIO aheadly "unfoldr" (Ops.sourceUnfoldr value)
111 [ benchSrcIO aheadly "unfoldr" (Ops.sourceUnfoldr value)
@@ -126,8 +126,8 @@ main = do
126 (Ops.concatStreamsWith ahead 2 (value `div` 2))
126 (Ops.concatStreamsWith ahead 2 (value `div` 2))
127 , benchMonadicSrcIO "concatMapWith (sqrt x,sqrt x)"
127 , benchMonadicSrcIO "concatMapWith (sqrt x,sqrt x)"
128 (Ops.concatStreamsWith ahead value2 value2)
128 (Ops.concatStreamsWith ahead value2 value2)
129− , benchMonadicSrcIO "concatMapWith (x/2,2)"
129+ , benchMonadicSrcIO "concatMapWith (sqrt x * 2,sqrt x / 2)"
130− (Ops.concatStreamsWith ahead (value `div` 2) 2)
130+ (Ops.concatStreamsWith ahead (value2 * 2) (value2 `div` 2))
132 -- XXX need to use smaller streams to finish in reasonable time
132 -- XXX need to use smaller streams to finish in reasonable time
133 , bgroup "parallely"
133 , bgroup "parallely"
@@ -148,8 +148,8 @@ main = do
148 (Ops.concatStreamsWith parallel 2 (value `div` 2))
148 (Ops.concatStreamsWith parallel 2 (value `div` 2))
149 , benchMonadicSrcIO "concatMapWith (sqrt x,sqrt x)"
149 , benchMonadicSrcIO "concatMapWith (sqrt x,sqrt x)"
150 (Ops.concatStreamsWith parallel value2 value2)
150 (Ops.concatStreamsWith parallel value2 value2)
151− , benchMonadicSrcIO "concatMapWith (x/2,2)"
151+ , benchMonadicSrcIO "concatMapWith (sqrt x * 2,sqrt x / 2)"
152− (Ops.concatStreamsWith parallel (value `div` 2) 2)
152+ (Ops.concatStreamsWith parallel (value2 * 2) (value2 `div` 2))
154 , bgroup "zip"
154 , bgroup "zip"
155 [ benchIO value "zip" Ops.zipAsync
155 [ benchIO value "zip" Ops.zipAsync