ToolShed.TimePure
Contents
Description
AUTHOR- Dr. Alistair Ward
DESCRIPTION- Determines the CPU-time, required to evaluate the specified pure expression.
CAVEAT
The function used to force evaluation of the pure expression rnf,
& the type-class which the polymorphic data must implement NFData,
have been relocated from module Control.Parallel.Strategies to Control.DeepSeq.
- getCPUSeconds :: NFData expression => expression -> IO (Double, expression)
- printCPUSeconds :: NFData expression => expression -> IO expression
Functions
Arguments
| :: NFData expression | |
| => expression | Arbitrary polymorphic expression. |
| -> IO (Double, expression) | The original expression, tagged with the CPU-seconds taken. |
- Time the specified pure expression.
- CAVEAT: as a side-effect, the expression is deep evaluated.
printCPUSeconds :: NFData expression => expression -> IO expressionSource
- Print the time required by the specified pure expression.
- CAVEAT: as a side-effect, the expression is deep evaluated.