Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Determines the CPU-time, required to evaluate the specified pure expression.
- getCPUSeconds :: (Fractional seconds, NFData expression) => expression -> IO (seconds, expression)
- printCPUSeconds :: NFData expression => expression -> IO expression
Functions
:: (Fractional seconds, NFData expression) | |
=> expression | Arbitrary polymorphic expression. |
-> IO (seconds, expression) | The original expression, tagged with the CPU-seconds taken. |
- Time the specified pure expression, returning the required number of CPU-seconds and the result, as a
Pair
. - CAVEAT: as a side-effect, the expression is deep evaluated.
printCPUSeconds :: NFData expression => expression -> IO expression Source
- Print the time required by the specified pure expression.
- CAVEAT: as a side-effect, the expression is deep evaluated.