on master help sign in
use "seq" on "value"

It improves many benchmarks significantly.

commitef958917ee52cf8701b0b5abe8e1607af1b18466 authorHarendra Kumar <harendra.kumar@gmail.com> dateTue 7 Jan 2020, 15:58 (7 years ago) parent8ec2ebe
5 files changed+5−5
benchmark/Linear.hs+1−1 benchmark/LinearAsync.hs+1−1 benchmark/LinearRate.hs+1−1 benchmark/Nested.hs+1−1 benchmark/NestedConcurrent.hs+1−1
benchmark/Linear.hs+1−1
@@ -128,7 +128,7 @@ main :: IO ()
128128main = do
129129 -- XXX Fix indentation
130130 (value, cfg, benches) <- parseCLIOpts defaultStreamSize
131− runMode (mode cfg) cfg benches
131+ value `seq` runMode (mode cfg) cfg benches
132132 [ bgroup "serially"
133133 [ bgroup "pure"
134134 [ benchPureSink value "id" id
benchmark/LinearAsync.hs+1−1
@@ -51,7 +51,7 @@ main :: IO ()
5151main = do
5252 -- XXX Fix indentation
5353 (value, cfg, benches) <- parseCLIOpts defaultStreamSize
54− runMode (mode cfg) cfg benches
54+ value `seq` runMode (mode cfg) cfg benches
5555 [ bgroup "asyncly"
5656 [ benchSrcIO asyncly "unfoldr" (Ops.sourceUnfoldr value)
5757 , benchSrcIO asyncly "unfoldrM" (Ops.sourceUnfoldrM value)
benchmark/LinearRate.hs+1−1
@@ -40,7 +40,7 @@ main :: IO ()
4040main = do
4141 -- XXX Fix indentation
4242 (value, cfg, benches) <- parseCLIOpts defaultStreamSize
43− runMode (mode cfg) cfg benches
43+ value `seq` runMode (mode cfg) cfg benches
4444 -- XXX arbitrarily large rate should be the same as rate Nothing
4545 [ bgroup "avgrate"
4646 [ bgroup "asyncly"
benchmark/Nested.hs+1−1
@@ -29,7 +29,7 @@ main :: IO ()
2929main = do
3030 -- XXX Fix indentation
3131 (linearCount, cfg, benches) <- parseCLIOpts defaultStreamSize
32− runMode (mode cfg) cfg benches
32+ linearCount `seq` runMode (mode cfg) cfg benches
3333 [ bgroup "serially"
3434 [ benchIO "toNullAp" $ Ops.toNullAp linearCount serially
3535 , benchIO "toNull" $ Ops.toNull linearCount serially
benchmark/NestedConcurrent.hs+1−1
@@ -29,7 +29,7 @@ main :: IO ()
2929main = do
3030 -- XXX Fix indentation
3131 (linearCount, cfg, benches) <- parseCLIOpts defaultStreamSize
32− runMode (mode cfg) cfg benches
32+ linearCount `seq` runMode (mode cfg) cfg benches
3333 [
3434 bgroup "aheadly"
3535 [ benchIO "toNullAp" $ Ops.toNullAp linearCount aheadly