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 "toNull" $ Ops.toNull serially
27 , benchIO "toList" $ Ops.toList serially
28 -- , benchIO "toListSome" $ Ops.toListSome serially
29 , benchIO "filterAllOut" $ Ops.filterAllOut serially
30 , benchIO "filterAllIn" $ Ops.filterAllIn serially
31 , benchIO "filterSome" $ Ops.filterSome serially
32 , benchIO "breakAfterSome" $ Ops.breakAfterSome serially
36 [ benchIO "toNull" $ Ops.toNull wSerially
37 , benchIO "toList" $ Ops.toList wSerially
38 -- , benchIO "toListSome" $ Ops.toListSome wSerially
39 , benchIO "filterAllOut" $ Ops.filterAllOut wSerially
40 , benchIO "filterAllIn" $ Ops.filterAllIn wSerially
41 , benchIO "filterSome" $ Ops.filterSome wSerially
42 , benchIO "breakAfterSome" $ Ops.breakAfterSome wSerially
46 [ benchIO "toNull" $ Ops.toNull aheadly
47 , benchIO "toList" $ Ops.toList aheadly
48 -- , benchIO "toListSome" $ Ops.toListSome aheadly
49 , benchIO "filterAllOut" $ Ops.filterAllOut aheadly
50 , benchIO "filterAllIn" $ Ops.filterAllIn aheadly
51 , benchIO "filterSome" $ Ops.filterSome aheadly
52 , benchIO "breakAfterSome" $ Ops.breakAfterSome aheadly
56 [ benchIO "toNull" $ Ops.toNull asyncly
57 , benchIO "toList" $ Ops.toList asyncly
58 -- , benchIO "toListSome" $ Ops.toListSome asyncly
59 , benchIO "filterAllOut" $ Ops.filterAllOut asyncly
60 , benchIO "filterAllIn" $ Ops.filterAllIn asyncly
61 , benchIO "filterSome" $ Ops.filterSome asyncly
62 , benchIO "breakAfterSome" $ Ops.breakAfterSome asyncly
66 [ benchIO "toNull" $ Ops.toNull wAsyncly
67 , benchIO "toList" $ Ops.toList wAsyncly
68 -- , benchIO "toListSome" $ Ops.toListSome wAsyncly
69 , benchIO "filterAllOut" $ Ops.filterAllOut wAsyncly
70 , benchIO "filterAllIn" $ Ops.filterAllIn wAsyncly
71 , benchIO "filterSome" $ Ops.filterSome wAsyncly
72 , benchIO "breakAfterSome" $ Ops.breakAfterSome wAsyncly
76 [ benchIO "toNull" $ Ops.toNull parallely
77 , benchIO "toList" $ Ops.toList parallely
78 --, benchIO "toListSome" $ Ops.toListSome parallely
79 , benchIO "filterAllOut" $ Ops.filterAllOut parallely
80 , benchIO "filterAllIn" $ Ops.filterAllIn parallely
81 , benchIO "filterSome" $ Ops.filterSome parallely
82 , 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