@@ -8,6 +8,7 @@ import Array
8import LargeDictionary
8import LargeDictionary
9import ArrayBench
9import ArrayBench
10import ListBench
10import ListBench
11import Random
12import Random
12import Time
13import Time
13{-| Compile this with --output=Benchmarks.html to generate
14{-| Compile this with --output=Benchmarks.html to generate
@@ -34,6 +35,8 @@ mySuite =
35 , Benchmark.bench2 "200 lookups in array of 500 elems: " ArrayBench.randomLookups indices200 (Array.fromList [1 .. 500] )
36 , Benchmark.bench2 "200 lookups in array of 500 elems: " ArrayBench.randomLookups indices200 (Array.fromList [1 .. 500] )
36 , Benchmark.bench2 "200 lookups in list of 500 elems: " ListBench.randomLookups indices200 ([1 .. 500] )
37 , Benchmark.bench2 "200 lookups in list of 500 elems: " ListBench.randomLookups indices200 ([1 .. 500] )
39+ , Benchmark.bench1 "30s simulated animation: " AnimateBench.runAnimation timeSteps30s
@@ -82,21 +85,31 @@ indexGen =
82--across multiple runs of the benchmark
85--across multiple runs of the benchmark
84--seed for our index generation
87--seed for our index generation
85−indexSeed = Random.initialSeed 56
89+ Random.initialSeed 56
88--Seed for our float generation
92--Seed for our float generation
89−seed = Random.initialSeed 23
94+ Random.initialSeed 23
92--Pseudo-random array of 500 floating point numbers
97--Pseudo-random array of 500 floating point numbers
93−array500 = (ArrayBench.randomArray floatGen 500 seed)
99+ (ArrayBench.randomArray floatGen 500 seed)
96--Same contents as array500, but in list form
102--Same contents as array500, but in list form
97−list500 = (ListBench.randomList floatGen 500 seed)
104+ (ListBench.randomList floatGen 500 seed)
100--Pseudo random list of 200 indices between 0 and 499
107--Pseudo random list of 200 indices between 0 and 499
101−indices200 = (ListBench.randomList indexGen 200 indexSeed)
109+ (ListBench.randomList indexGen 200 indexSeed)
112+--List of timesteps simulating 30 seconds of animation at 30fps
114+ List.map (\x -> (1.0 / 30.0) * (toFloat x * Time.second) ) [1 .. 900]