diff options
Diffstat (limited to 'bench/Main.hs')
-rw-r--r-- | bench/Main.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bench/Main.hs b/bench/Main.hs index 08ebab8..2c1da50 100644 --- a/bench/Main.hs +++ b/bench/Main.hs | |||
@@ -76,15 +76,18 @@ main = do | |||
76 | 76 | ||
77 | , let d = A.bPack $ A.BList $ | 77 | , let d = A.bPack $ A.BList $ |
78 | L.map A.BInt (L.replicate 1000 (0 :: Integer)) | 78 | L.map A.BInt (L.replicate 1000 (0 :: Integer)) |
79 | in d `seq` (bench "list10000int/bencode/decode" $ nf | 79 | in d `seq` (bench "list1000int/bencode/decode" $ nf |
80 | (fromJust . A.bRead :: BL.ByteString -> A.BEncode) d) | 80 | (fromJust . A.bRead :: BL.ByteString -> A.BEncode) d) |
81 | 81 | ||
82 | , let d = BL.toStrict (C.encoded (L.replicate 10000 ())) | 82 | , let d = BL.toStrict (C.encoded (L.replicate 10000 ())) |
83 | in d `seq` (bench "list10000unit/bencoding/decode" $ nf | 83 | in d `seq` (bench "list10000unit/bencoding/decode" $ nf |
84 | (C.decoded :: B.ByteString -> Either String [()]) d) | 84 | (C.decoded :: B.ByteString -> Either String [()]) d) |
85 | 85 | ||
86 | , let d = BL.toStrict (C.encoded (L.replicate 10000 (0 :: Int))) | 86 | , let d = BL.toStrict $ C.encoded $ L.replicate 10000 (0 :: Int) |
87 | in d `seq` (bench "list10000int/bencoding/decode" $ nf | 87 | in d `seq` (bench "list10000int/bencoding/decode" $ nf |
88 | (C.decoded :: B.ByteString -> Either String [Int]) d) | 88 | (C.decoded :: B.ByteString -> Either String [Int]) d) |
89 | 89 | ||
90 | , let d = L.replicate 10000 0 | ||
91 | in bench "list10000int/bencoding/encode>>decode" $ nf | ||
92 | (getRight . C.decoded . BL.toStrict . C.encoded :: [Int] -> [Int] ) d | ||
90 | ] | 93 | ] |