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 -- this hangs, need to investigate
52 , benchIO "filterSome" $ Ops.filterSome aheadly
53 , benchIO "breakAfterSome" $ Ops.breakAfterSome aheadly
57 [ benchIO "toNull" $ Ops.toNull asyncly
58 , benchIO "toList" $ Ops.toList asyncly
59 , benchIO "toListSome" $ Ops.toListSome asyncly
60 , benchIO "filterAllOut" $ Ops.filterAllOut asyncly
61 , benchIO "filterAllIn" $ Ops.filterAllIn asyncly
62 , benchIO "filterSome" $ Ops.filterSome asyncly
63 , benchIO "breakAfterSome" $ Ops.breakAfterSome asyncly
67 [ benchIO "toNull" $ Ops.toNull wAsyncly
68 , benchIO "toList" $ Ops.toList wAsyncly
69 , benchIO "toListSome" $ Ops.toListSome wAsyncly
70 , benchIO "filterAllOut" $ Ops.filterAllOut wAsyncly
71 , benchIO "filterAllIn" $ Ops.filterAllIn wAsyncly
72 , benchIO "filterSome" $ Ops.filterSome wAsyncly
73 , benchIO "breakAfterSome" $ Ops.breakAfterSome wAsyncly
77 [ benchIO "toNull" $ Ops.toNull parallely
78 , benchIO "toList" $ Ops.toList parallely
79 , benchIO "toListSome" $ Ops.toListSome parallely
80 , benchIO "filterAllOut" $ Ops.filterAllOut parallely
81 , benchIO "filterAllIn" $ Ops.filterAllIn parallely
82 , benchIO "filterSome" $ Ops.filterSome parallely
83 , 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