Skip to content

Commit cc8046c

Browse files
committed
Add Tree-based benchmarks
1 parent f26d791 commit cc8046c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/benchmark.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ main :: IO ()
5151
main = do microbench "insNode into AVL tree" insNodeAVL
5252
microbench "insNode into PATRICIA tree" insNodePatricia
5353

54+
microbench "buildFull into AVL tree 100" (buildFullAVL 100)
55+
microbench "buildFull into AVL tree 500" (buildFullAVL 500)
56+
microbench "buildFull into AVL tree 1000" (buildFullAVL 1000)
57+
5458
microbench "buildFull into PATRICIA tree 100" (buildFullPatricia 100)
5559
microbench "buildFull into PATRICIA tree 500" (buildFullPatricia 500)
5660
microbench "buildFull into PATRICIA tree 1000" (buildFullPatricia 1000)
@@ -67,6 +71,9 @@ main = do microbench "insNode into AVL tree" insNodeAVL
6771
microbench "emap on AVL tree" emapAVL
6872
microbench "emap on PATRICIA tree" emapPatricia
6973

74+
buildFullAVL :: Int -> Int -> ()
75+
buildFullAVL = buildFull (Proxy :: TreeP)
76+
7077
insNodeAVL :: Int -> AVL.UGr
7178
insNodeAVL = insNodes' empty
7279

0 commit comments

Comments
 (0)