3-- Copyright : (c) 2018 Harendra Kumar
6-- Maintainer : harendra.kumar@gmail.com
8import Control.DeepSeq (NFData)
9import Data.Functor.Identity (Identity, runIdentity)
10import System.Random (randomRIO)
11import qualified NestedOps as Ops
15benchIO :: (NFData b) => String -> (Int -> IO b) -> Benchmark
16benchIO name f = bench name $ nfIO $ randomRIO (1,1) >>= f
18_benchId :: (NFData b) => String -> (Int -> Identity b) -> Benchmark
19_benchId name f = bench name $ nf (\g -> runIdentity (g 1)) f
23 -- TBD Study scaling with 10, 100, 1000 loop iterations
26 [ benchIO "toNullLinear" Ops.toNullLinear
27 , benchIO "toListLinear" Ops.toListLinear
31 [ benchIO "append" $ Ops.append serially
32 , benchIO "toNull0" $ Ops.toNull0 serially
33 , benchIO "toList0" $ Ops.toList0 serially
34 , benchIO "toNull" $ Ops.toNull serially
35 , benchIO "toList" $ Ops.toList serially
36 , benchIO "toListSome" $ Ops.toListSome serially
37 , benchIO "filterAllOut" $ Ops.filterAllOut serially
38 , benchIO "filterAllIn" $ Ops.filterAllIn serially
39 , benchIO "filterSome" $ Ops.filterSome serially
40 , benchIO "breakAfterSome" $ Ops.breakAfterSome serially
44 [ benchIO "append" $ Ops.append wSerially
45 , benchIO "toNull0" $ Ops.toNull0 wSerially
46 , benchIO "toList0" $ Ops.toList0 wSerially
47 , benchIO "toNull" $ Ops.toNull wSerially
48 , benchIO "toList" $ Ops.toList wSerially
49 , benchIO "toListSome" $ Ops.toListSome wSerially
50 , benchIO "filterAllOut" $ Ops.filterAllOut wSerially
51 , benchIO "filterAllIn" $ Ops.filterAllIn wSerially
52 , benchIO "filterSome" $ Ops.filterSome wSerially
53 , benchIO "breakAfterSome" $ Ops.breakAfterSome wSerially
57 [ benchIO "append" $ Ops.append aheadly
58 , benchIO "toNull0" $ Ops.toNull0 aheadly
59 , benchIO "toList0" $ Ops.toList0 aheadly
60 , benchIO "toNull" $ Ops.toNull aheadly
61 , benchIO "toList" $ Ops.toList aheadly
62 , benchIO "toListSome" $ Ops.toListSome aheadly
63 , benchIO "filterAllOut" $ Ops.filterAllOut aheadly
64 , benchIO "filterAllIn" $ Ops.filterAllIn aheadly
65 , benchIO "filterSome" $ Ops.filterSome aheadly
66 , benchIO "breakAfterSome" $ Ops.breakAfterSome aheadly
70 [ benchIO "append" $ Ops.append asyncly
71 , benchIO "toNull0" $ Ops.toNull0 asyncly
72 , benchIO "toList0" $ Ops.toList0 asyncly
73 , benchIO "toNull" $ Ops.toNull asyncly
74 , benchIO "toList" $ Ops.toList asyncly
75 , benchIO "toListSome" $ Ops.toListSome asyncly
76 , benchIO "filterAllOut" $ Ops.filterAllOut asyncly
77 , benchIO "filterAllIn" $ Ops.filterAllIn asyncly
78 , benchIO "filterSome" $ Ops.filterSome asyncly
79 , benchIO "breakAfterSome" $ Ops.breakAfterSome asyncly
83 [ benchIO "append" $ Ops.append wAsyncly
84 , benchIO "toNull0" $ Ops.toNull0 wAsyncly
85 , benchIO "toList0" $ Ops.toList0 wAsyncly
86 , benchIO "toNull" $ Ops.toNull wAsyncly
87 , benchIO "toList" $ Ops.toList wAsyncly
88 , benchIO "toListSome" $ Ops.toListSome wAsyncly
89 , benchIO "filterAllOut" $ Ops.filterAllOut wAsyncly
90 , benchIO "filterAllIn" $ Ops.filterAllIn wAsyncly
91 , benchIO "filterSome" $ Ops.filterSome wAsyncly
92 , benchIO "breakAfterSome" $ Ops.breakAfterSome wAsyncly
96 [ benchIO "append" $ Ops.append parallely
97 , benchIO "toNull0" $ Ops.toNull0 parallely
98 , benchIO "toList0" $ Ops.toList0 parallely
99 , benchIO "toNull" $ Ops.toNull parallely
100 , benchIO "toList" $ Ops.toList parallely
101 , benchIO "toListSome" $ Ops.toListSome parallely
102 , benchIO "filterAllOut" $ Ops.filterAllOut parallely
103 , benchIO "filterAllIn" $ Ops.filterAllIn parallely
104 , benchIO "filterSome" $ Ops.filterSome parallely
105 , benchIO "breakAfterSome" $ Ops.breakAfterSome parallely
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list