Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added Benchmark.hs.

  • Loading branch information...
commit 96d2e01c67365cbca59f7c73a9327bb00c8f2e2d 1 parent 6563d9d
John MacFarlane authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 Benchmark.hs
View
14 Benchmark.hs
@@ -0,0 +1,14 @@
+import Text.Pandoc2
+import Criterion.Main
+import Data.List (isSuffixOf)
+import Text.JSON.Generic
+import Data.Text.Encoding (decodeUtf8)
+import Data.ByteString as B
+
+main = do
+ inp <- B.readFile "README.markdown"
+ let poptions' = poptions
+ let convert :: B.ByteString -> Maybe Blocks
+ convert = markdownDoc poptions' . decodeUtf8
+ defaultMain [ bench ("markdown reader") $ whnf convert inp ]
+
Please sign in to comment.
Something went wrong with that request. Please try again.