Skip to content

Instantly share code, notes, and snippets.

@ElvishJerricco
Created April 5, 2017 00:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ElvishJerricco/461498ca762fdf61491c843e5e5882fd to your computer and use it in GitHub Desktop.
Save ElvishJerricco/461498ca762fdf61491c843e5e5882fd to your computer and use it in GitHub Desktop.
import Criterion
import Criterion.Main
import HSTrav
import Data.List
import qualified Data.Sequence as Seq
main :: IO ()
main = defaultMain
[ bench "heap-sort" (nf sortTraversable [1000000,999999 .. 1 :: Int])
, bench "sort" (nf sort [1000000,999999 .. 1 :: Int])
, bench "seq" (nf Seq.sort (Seq.fromList [1000000,999999 .. 1 :: Int]))
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment