summaryrefslogtreecommitdiff
path: root/AATree/testTree.hs
blob: 6d625e7e0ff63a51d0a8ec7fa0ba5a864466d724 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import AATree.AATree
import Criterion.Main
import Shuffle
import Control.DeepSeq
import Data.List
import Sort.Sort

main = do
    xs <- shuffle ([1..5000]::[Int])
    defaultMain [
        bench "sort" (nf sort xs),
        bench "msort" (nf msort xs),
        bench "aasort" (nf aasort xs),
        bench "head-sort" (nf (head.sort) xs),
        bench "head-msort" (nf (head.msort) xs),
        bench "head-aasort" (nf (head.aasort) xs)]