|
definition: |
iterateBench :: ([a] -> b) -> Int -> Benchmark a -> Benchmark b iterateBench averagef n (BM pre post action) = BM pre post $ mapM (\_ -> action) [1..n] >>= \rs -> return (averagef rs) |
|
demand: |
argument 3 |
|
deterministic: |
deterministic operation |
|
documentation: |
Iterates a benchmark multiple times and computes the average according to a given average function (first argument). The preparation and cleanup actions of the benchmark are only executed once, i.e., they are not iterated. |
|
failfree: |
(_, _, _) |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{(_,_,{BM}) |-> _}
|
|
name: |
iterateBench |
|
precedence: |
no precedence defined |
|
result-values: |
_ |
|
signature: |
([a] -> b) -> Prelude.Int -> Benchmark a -> Benchmark b |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
possibly non-reducible on same data term |