Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Benchmark where
- bench :: String -> Batch () -> Benchmark
- bgroup :: String -> [Benchmark] -> Benchmark
- env :: NFData r => IO r -> (r -> IO ()) -> (Env r -> Benchmark) -> Benchmark
- series :: (Show a, Enum a) => Vector a -> (a -> Benchmark) -> Benchmark
- data Batch a
- runBatch :: Batch () -> Int64 -> IO ()
- nf :: NFData b => (a -> b) -> a -> Batch ()
- nfIO :: NFData a => IO a -> Batch ()
- whnf :: (a -> b) -> a -> Batch ()
- whnfIO :: IO a -> Batch ()
- data Env r
- use :: Env r -> Batch r
Benchmarks
Batches
nf :: NFData b => (a -> b) -> a -> Batch () Source #
Apply an argument to a function, and evaluate the result to head normal form (NF).
nfIO :: NFData a => IO a -> Batch () Source #
Perform an action, then evaluate its result to head normal form.
This is particularly useful for forcing a lazy IO
action to be
completely performed.
whnf :: (a -> b) -> a -> Batch () Source #
Apply an argument to a function, and evaluate the result to weak head normal form (WHNF).
whnfIO :: IO a -> Batch () Source #
Perform an action, then evaluate its result to weak head normal
form (WHNF). This is useful for forcing an IO
action whose result
is an expression to be evaluated down to a more useful value.