@@ -17,6 +17,7 @@ import TupleBench
17import SmallTupleBench
17import SmallTupleBench
18import CtorBench
18import CtorBench
19import SmallCtorBench
19import SmallCtorBench
20+import PatternMatchBench
21{-| Compile this with --output=Benchmarks.html to generate
22{-| Compile this with --output=Benchmarks.html to generate
22 a webpage, which runs the benchmarks and shows the results.
23 a webpage, which runs the benchmarks and shows the results.
@@ -27,11 +28,17 @@ mySuite =
27 Benchmark.Suite "My Suite"
28 Benchmark.Suite "My Suite"
28 [ Benchmark.bench1 "Access 20-field record 200 times: " RecordBench.sumRandomElems indices200
29 [ Benchmark.bench1 "Access 20-field record 200 times: " RecordBench.sumRandomElems indices200
29 , Benchmark.bench1 "Access 9-field record 200 times: " SmallRecordBench.sumRandomElems indices200
30 , Benchmark.bench1 "Access 9-field record 200 times: " SmallRecordBench.sumRandomElems indices200
30 , Benchmark.bench1 "Access 9-field tuple 200 times: " TupleBench.sumRandomElems indices200
32 , Benchmark.bench1 "Access 9-field tuple 200 times: " TupleBench.sumRandomElems indices200
31 , Benchmark.bench1 "Access 3-field tuple 200 times: " SmallTupleBench.sumRandomElems indices200
33 , Benchmark.bench1 "Access 3-field tuple 200 times: " SmallTupleBench.sumRandomElems indices200
32 , Benchmark.bench1 "Access 20-constructor Type 200 times: " CtorBench.sumFieldsList ctorData200
35 , Benchmark.bench1 "Access 20-constructor Type 200 times: " CtorBench.sumFieldsList ctorData200
33 , Benchmark.bench1 "Access 10-constructor Type 200 times: " SmallCtorBench.sumFieldsList smallCtorData200
36 , Benchmark.bench1 "Access 10-constructor Type 200 times: " SmallCtorBench.sumFieldsList smallCtorData200
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
35 , Benchmark.bench1 "Make and sum dict, 10000 elems: " LargeDictionary.addNToDictAndSum 10000
42 , Benchmark.bench1 "Make and sum dict, 10000 elems: " LargeDictionary.addNToDictAndSum 10000
36 , Benchmark.bench1 "Make and sum dict, 50 elems: " LargeDictionary.addNToDictAndSum 50
43 , Benchmark.bench1 "Make and sum dict, 50 elems: " LargeDictionary.addNToDictAndSum 50
@@ -129,4 +136,8 @@ ctorData200 =
131smallCtorData200 =
138smallCtorData200 =
132− List.map SmallCtorBench.makeRandomData indices200
139+ List.map SmallCtorBench.makeRandomData indices200
143+ List.map PatternMatchBench.intToNest indices200