lzo-0.1.1.1: bench/Bench.hs
module Main (main) where
import Codec.Compression.Lzo
import Criterion.Main
import qualified Data.ByteString.Lazy as BSL
decompressBench :: FilePath -> IO ()
decompressBench fp' = forceBSL =<<
(decompressFile <$> BSL.readFile fp')
where forceBSL = (`seq` mempty) . last . BSL.toChunks
main :: IO ()
main =
defaultMain [
bgroup "decompress/file"
[ bench "lzo" $ nfIO (decompressBench "../llvm-9.0.0.src.tar.lzo") ]
]