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 "toNullAp" $ Ops.toNullAp serially
27 , benchIO "toNull" $ Ops.toNull serially
28 , benchIO "toList" $ Ops.toList serially
29 -- , benchIO "toListSome" $ Ops.toListSome serially
30 , benchIO "filterAllOut" $ Ops.filterAllOut serially
31 , benchIO "filterAllIn" $ Ops.filterAllIn serially
32 , benchIO "filterSome" $ Ops.filterSome serially
33 , benchIO "breakAfterSome" $ Ops.breakAfterSome serially
37 [ benchIO "toNullAp" $ Ops.toNullAp wSerially
38 , benchIO "toNull" $ Ops.toNull wSerially
39 , benchIO "toList" $ Ops.toList wSerially
40 -- , benchIO "toListSome" $ Ops.toListSome wSerially
41 , benchIO "filterAllOut" $ Ops.filterAllOut wSerially
42 , benchIO "filterAllIn" $ Ops.filterAllIn wSerially
43 , benchIO "filterSome" $ Ops.filterSome wSerially
44 , benchIO "breakAfterSome" $ Ops.breakAfterSome wSerially
48 [ benchIO "toNullAp" $ Ops.toNullAp aheadly
49 , benchIO "toNull" $ Ops.toNull aheadly
50 , benchIO "toList" $ Ops.toList aheadly
51 -- , benchIO "toListSome" $ Ops.toListSome aheadly
52 , benchIO "filterAllOut" $ Ops.filterAllOut aheadly
53 , benchIO "filterAllIn" $ Ops.filterAllIn aheadly
54 , benchIO "filterSome" $ Ops.filterSome aheadly
55 , benchIO "breakAfterSome" $ Ops.breakAfterSome aheadly
59 [ benchIO "toNullAp" $ Ops.toNullAp asyncly
60 , benchIO "toNull" $ Ops.toNull asyncly
61 , benchIO "toList" $ Ops.toList asyncly
62 -- , benchIO "toListSome" $ Ops.toListSome asyncly
63 , benchIO "filterAllOut" $ Ops.filterAllOut asyncly
64 , benchIO "filterAllIn" $ Ops.filterAllIn asyncly
65 , benchIO "filterSome" $ Ops.filterSome asyncly
66 , benchIO "breakAfterSome" $ Ops.breakAfterSome asyncly
70 [ benchIO "toNullAp" $ Ops.toNullAp wAsyncly
71 , benchIO "toNull" $ Ops.toNull wAsyncly
72 , benchIO "toList" $ Ops.toList wAsyncly
73 -- , benchIO "toListSome" $ Ops.toListSome wAsyncly
74 , benchIO "filterAllOut" $ Ops.filterAllOut wAsyncly
75 , benchIO "filterAllIn" $ Ops.filterAllIn wAsyncly
76 , benchIO "filterSome" $ Ops.filterSome wAsyncly
77 , benchIO "breakAfterSome" $ Ops.breakAfterSome wAsyncly
81 [ benchIO "toNullAp" $ Ops.toNullAp parallely
82 , benchIO "toNull" $ Ops.toNull parallely
83 , benchIO "toList" $ Ops.toList parallely
84 --, benchIO "toListSome" $ Ops.toListSome parallely
85 , benchIO "filterAllOut" $ Ops.filterAllOut parallely
86 , benchIO "filterAllIn" $ Ops.filterAllIn parallely
87 , benchIO "filterSome" $ Ops.filterSome parallely
88 , 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