@@ -17,6 +17,7 @@ import TupleBench
1717import SmallTupleBench
1818import CtorBench
1919import SmallCtorBench
20+import PatternMatchBench
2021
2122{-| Compile this with --output=Benchmarks.html to generate
2223 a webpage, which runs the benchmarks and shows the results.
@@ -27,11 +28,17 @@ mySuite =
2728 Benchmark.Suite "My Suite"
2829 [ Benchmark.bench1 "Access 20-field record 200 times: " RecordBench.sumRandomElems indices200
2930 , Benchmark.bench1 "Access 9-field record 200 times: " SmallRecordBench.sumRandomElems indices200
31+
3032 , Benchmark.bench1 "Access 9-field tuple 200 times: " TupleBench.sumRandomElems indices200
3133 , Benchmark.bench1 "Access 3-field tuple 200 times: " SmallTupleBench.sumRandomElems indices200
34+
3235 , Benchmark.bench1 "Access 20-constructor Type 200 times: " CtorBench.sumFieldsList ctorData200
3336 , Benchmark.bench1 "Access 10-constructor Type 200 times: " SmallCtorBench.sumFieldsList smallCtorData200
3437
38+ , Benchmark.bench1 "Pattern match 18-levels deep, use all values, 200 times " PatternMatchBench.deepMatchSum nestedData200
39+ , Benchmark.bench1 "Pattern match 18-levels deep, 16 wildcards, 200 times " PatternMatchBench.wildcardMatchSum nestedData200
40+ , Benchmark.bench1 "Pattern match 4-levels deep, use all values, 200 times " PatternMatchBench.shallowMatchSum nestedData200
41+
3542 , Benchmark.bench1 "Make and sum dict, 10000 elems: " LargeDictionary.addNToDictAndSum 10000
3643 , Benchmark.bench1 "Make and sum dict, 50 elems: " LargeDictionary.addNToDictAndSum 50
3744
@@ -129,4 +136,8 @@ ctorData200 =
129136
130137
131138smallCtorData200 =
132− List.map SmallCtorBench.makeRandomData indices200
139+ List.map SmallCtorBench.makeRandomData indices200
140+
141+
142+nestedData200 =
143+ List.map PatternMatchBench.intToNest indices200