Permalink
Browse files

Add benchmark for streaming decoding

  • Loading branch information...
1 parent ead0ad2 commit 1621a58e5758ad291c60db11e83da6b7f470fa52 @tibbe tibbe committed Feb 25, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 benchmarks/Benchmarks.hs
View
4 benchmarks/Benchmarks.hs
@@ -119,6 +119,7 @@ main = do
]
, bgroup "comparison"
[ bench "cassava" $ nf idDecode csvData
+ , bench "cassava/streaming" $ nf idDecodeS csvData
, bench "lazy-csv" $ nf LazyCsv.parseCSV csvData
]
]
@@ -134,3 +135,6 @@ main = do
idDecodeN :: BL.ByteString -> Either String (Header, Vector (BSHashMap B.ByteString))
idDecodeN = decodeByName
+
+ idDecodeS :: BL.ByteString -> Streaming.Records (Vector B.ByteString)
+ idDecodeS = Streaming.decode False

0 comments on commit 1621a58

Please sign in to comment.