diff options
Diffstat (limited to 'bench')
-rw-r--r-- | bench/Main.hs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/bench/Main.hs b/bench/Main.hs index 70eb4822..6662b953 100644 --- a/bench/Main.hs +++ b/bench/Main.hs | |||
@@ -55,6 +55,13 @@ selectionStrictFirst n = strictFirst (BT.empty n) (BT.empty n) [] | |||
55 | selectionStrictLast :: Int -> Maybe Int | 55 | selectionStrictLast :: Int -> Maybe Int |
56 | selectionStrictLast n = strictLast (BT.empty n) (BT.empty n) [] | 56 | selectionStrictLast n = strictLast (BT.empty n) (BT.empty n) [] |
57 | 57 | ||
58 | selectionRarestFirst :: Int -> Maybe Int | ||
59 | selectionRarestFirst n = rarestFirst (BT.empty n) (BT.empty n) | ||
60 | (replicate 10 (BT.empty n)) | ||
61 | |||
62 | selectionEndGame :: Int -> Maybe Int | ||
63 | selectionEndGame n = endGame (BT.empty n) (BT.empty n) [] | ||
64 | |||
58 | main :: IO () | 65 | main :: IO () |
59 | main = do | 66 | main = do |
60 | let blockixs = replicate 5000 (Request (BlockIx 0 0 0)) | 67 | let blockixs = replicate 5000 (Request (BlockIx 0 0 0)) |
@@ -71,7 +78,7 @@ main = do | |||
71 | , ("choke", chokes) | 78 | , ("choke", chokes) |
72 | , ("havenone", havenones) | 79 | , ("havenone", havenones) |
73 | ] | 80 | ] |
74 | ++ -- 256KiB * 10M = 2.5TiB | 81 | ++ -- 256KiB * 10M = 2.5TiB bitfield for 10 ms |
75 | [ bench "bitfield/min" $ nf bitfieldMin (10 * m) | 82 | [ bench "bitfield/min" $ nf bitfieldMin (10 * m) |
76 | , bench "bitfield/max" $ nf bitfieldMax (10 * m) | 83 | , bench "bitfield/max" $ nf bitfieldMax (10 * m) |
77 | , bench "bitfield/difference" $ nf bitfieldDiff (10 * m) | 84 | , bench "bitfield/difference" $ nf bitfieldDiff (10 * m) |
@@ -79,7 +86,9 @@ main = do | |||
79 | , bench "bitfield/union" $ nf bitfieldUnion (10 * m) | 86 | , bench "bitfield/union" $ nf bitfieldUnion (10 * m) |
80 | 87 | ||
81 | , bench "selection/strictFirst" $ nf selectionStrictFirst (10 * m) | 88 | , bench "selection/strictFirst" $ nf selectionStrictFirst (10 * m) |
82 | , bench "selection/strictFirst" $ nf selectionStrictLast (10 * m) | 89 | , bench "selection/strictLast" $ nf selectionStrictLast (10 * m) |
90 | , bench "selection/rarestFirst" $ nf selectionRarestFirst (10 * m) | ||
91 | , bench "selection/endGame" $ nf selectionEndGame (10 * m) | ||
83 | ] | 92 | ] |
84 | where | 93 | where |
85 | mkMsgBench name msgs = | 94 | mkMsgBench name msgs = |