INLINE the main benchmark function
makes a big difference especially when the times are small.
commit42e5c6bd9346f9b099e9174617813529d9c57339
authorHarendra Kumar <harendra.kumar@gmail.com>
dateWed 20 Jun 2018, 04:49 (8 years ago)
parentb77e76f
benchmark/Linear.hs+1
@@ -18,6 +18,7 @@ import Gauge
1818benchIO :: (IsStream t, NFData b) => String -> (t IO Int -> IO b) -> Benchmark
1919benchIO name f = bench name $ nfIO $ randomRIO (1,1000) >>= f . Ops.source
2020
21+{-# INLINE benchSrcIO #-}
2122benchSrcIO
2223 :: (t IO Int -> SerialT IO Int)
2324 -> String