Permalink
Browse files

add a simple decode benchmark.

  • Loading branch information...
1 parent e72d3d8 commit b3b45c3feec78413b1a9761e714cc3bcbbb82001 @vincenthz vincenthz committed Nov 16, 2011
Showing with 7 additions and 0 deletions.
  1. +7 −0 benchmarks/Benchmarks.hs
View
@@ -13,4 +13,11 @@ main = defaultMain [
, bench "1024" $ whnf B16.encode (generate 1024)
, bench "65536" $ whnf B16.encode (generate 65536)
]
+ , bgroup "decode" [
+ bench "8" $ whnf (B16.decode . B16.encode) (generate 8)
+ , bench "32" $ whnf (B16.decode . B16.encode) (generate 32)
+ , bench "128" $ whnf (B16.decode . B16.encode) (generate 128)
+ , bench "1024" $ whnf (B16.decode . B16.encode) (generate 1024)
+ , bench "65536" $ whnf (B16.decode . B16.encode) (generate 65536)
+ ]
]

0 comments on commit b3b45c3

Please sign in to comment.