module Main where import Criterion.Main import Data.Text.Lazy (fromStrict) import Data.Text.WordCount import Text.Pandoc main = do defaultMain [ env ulysses $ \file -> bgroup "ulysses all" [ bench "226" $ nf (fun 10000000) file ] , env beowulf $ \file -> bgroup "beowulf all" [ bench "226" $ nf (fun 10000000) file ] ] where fun n = topN n . fromStrict ulysses = runIOorExplode $ processFile "test/ulysses.txt" beowulf = runIOorExplode $ processFile "test/beowulf.txt"