1{- | Specification of the benchmarks.
3This module keeps a list of all bencharks, this way
4we can group benchmark by the interesting function, not
11import Criterion (Benchmark)
14{- | List of benchmarks that each module should provide.
15If implementation can express the benchmark then it
16can return @Nothing@ in that benchmark.
18Map should contain elements from @1@ to @size of map@
19inserted in ascending order (later that requirement may
22data BenchSpec = BenchSpec
23 { {- | Basic lookup we look 10 values inside 10k map.
25 Implementation may look like:
28 tenLookups :: TypeRepMap (Proxy :: Nat -> *)
29 -> ( Proxy 10, Proxy 20, Proxy 30, Proxy 40
30 , Proxy 50, Proxy 60, Proxy 70, Proxy 80
32 tenLookups tmap = (lp, lp, lp, lp, lp, lp, lp, lp)
35 benchLookup :: Maybe (String -> Benchmark)
36 {- ^ Insert 10 elements into an empty map.
38 Implementation may look like:
42 :: forall a . (KnownNat a)
43 => TypeRepMap (Proxy :: Nat -> *)
46 -> TypeRepMap (Proxy :: Nat -> *)
48 inserts !c n x = inserts (insert x c) (n-1) (Proxy :: Proxy (a+1))
51 , benchInsertSmall :: Maybe (String -> Benchmark)
52 {- ^ Insert 10 elements into a big map. Implementation is like
53 a small map, but should insert values into 10k elements map.
55 , benchInsertBig :: Maybe (String -> Benchmark)
56 {- ^ Insert 10 elements into map of 10 elements, where each key
57 was already inserted in the map
59 , benchUpdateSmall :: Maybe (String -> Benchmark)
60 {- ^ Insert 10 elements into map of 10k elements, where each key
61 was already inserted in the map
63 , benchUpdateBig :: Maybe (String -> Benchmark)
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