File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,16 @@ main = do
20
20
r1000 = rlist 1000
21
21
rnf [r10, r100, r1000] `seq` return ()
22
22
defaultMain
23
- [ bench " splitAt/append 10" $ nf (shuffle r10) s10
24
- , bench " splitAt/append 100" $ nf (shuffle r100) s100
25
- , bench " splitAt/append 1000" $ nf (shuffle r1000) s1000
26
- ]
23
+ [ bgroup " splitAt/append"
24
+ [ bench " 10" $ nf (shuffle r10) s10
25
+ , bench " 100" $ nf (shuffle r100) s100
26
+ , bench " 1000" $ nf (shuffle r1000) s1000
27
+ ]
28
+ , bgroup " zip"
29
+ [ bench " ix10000/5000" $ nf (\ (xs,ys) -> S. zip xs ys `S.index` 5000 ) (S. replicate 10000 () , S. fromList [1 .. 10000 :: Int ])
30
+ , bench " nf150" $ nf (uncurry S. zip ) (S. fromList [1 .. 150 :: Int ], S.replicate 150 () )
31
+ , bench " nf10000" $ nf (uncurry S. zip ) (S. fromList [1 .. 10000 :: Int ], S.replicate 10000 () )
32
+ ] ]
27
33
28
34
-- splitAt+append: repeatedly cut the sequence at a random point
29
35
-- and rejoin the pieces in the opposite order.
You can’t perform that action at this time.
0 commit comments