|
definition: |
benchTimeNF :: IO a -> Benchmark Float
benchTimeNF getexp = benchmark $ do
garbageCollect
garbageCollectorOff
pi1 <- getProcessInfos
exp <- getexp
seq (id $!! exp) (return ())
pi2 <- getProcessInfos
garbageCollectorOn
let rtime = maybe 0 id (lookup RunTime pi2)
- maybe 0 id (lookup RunTime pi1)
return (fromInt rtime / 1000.0)
|
|
demand: |
no demanded arguments |
|
deterministic: |
deterministic operation |
|
documentation: |
Benchmark the time (in seconds) to compute the normal form of an expression. The expression is created by an I/O action (first parameter). This avoids the sharing of the normalization process between multiple runs of the benchmark and provides more flexibility, e.g., to read benchmark input data from global variables. |
|
failfree: |
_ |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{(_) |-> _}
|
|
name: |
benchTimeNF |
|
precedence: |
no precedence defined |
|
result-values: |
_ |
|
signature: |
Prelude.IO a -> Benchmark Prelude.Float |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
possibly non-reducible on same data term |