diff options
-rw-r--r-- | Data/Digest/CRC24.hs | 4 | ||||
-rw-r--r-- | bench/mark.hs | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/Data/Digest/CRC24.hs b/Data/Digest/CRC24.hs index e8eec92..4fbb9b1 100644 --- a/Data/Digest/CRC24.hs +++ b/Data/Digest/CRC24.hs | |||
@@ -1,5 +1,5 @@ | |||
1 | -- CRC24.hs: OpenPGP (RFC4880) CRC24 implementation | 1 | -- CRC24.hs: OpenPGP (RFC4880) CRC24 implementation |
2 | -- Copyright © 2012 Clint Adams | 2 | -- Copyright © 2012-2019 Clint Adams |
3 | -- This software is released under the terms of the ISC license. | 3 | -- This software is released under the terms of the ISC license. |
4 | -- (See the LICENSE file). | 4 | -- (See the LICENSE file). |
5 | 5 | ||
@@ -27,4 +27,4 @@ crc24 :: B.ByteString -> Word32 | |||
27 | crc24 bs = crc24Lazy . BL.fromChunks $ [bs] | 27 | crc24 bs = crc24Lazy . BL.fromChunks $ [bs] |
28 | 28 | ||
29 | crc24Lazy :: ByteString -> Word32 | 29 | crc24Lazy :: ByteString -> Word32 |
30 | crc24Lazy = BL.foldl crc24Update crc24Init | 30 | crc24Lazy = BL.foldl' crc24Update crc24Init |
diff --git a/bench/mark.hs b/bench/mark.hs index 8251823..cf1f20f 100644 --- a/bench/mark.hs +++ b/bench/mark.hs | |||
@@ -1,5 +1,5 @@ | |||
1 | -- mark.hs: openpgp-asciiarmor benchmark suite | 1 | -- mark.hs: openpgp-asciiarmor benchmark suite |
2 | -- Copyright © 2018 Clint Adams | 2 | -- Copyright © 2018-2019 Clint Adams |
3 | -- This software is released under the terms of the ISC license. | 3 | -- This software is released under the terms of the ISC license. |
4 | -- (See the LICENSE file). | 4 | -- (See the LICENSE file). |
5 | 5 | ||
@@ -11,6 +11,8 @@ import Data.Digest.CRC24 | |||
11 | 11 | ||
12 | main :: IO () | 12 | main :: IO () |
13 | main = defaultMain [ | 13 | main = defaultMain [ |
14 | bgroup "crc" [ bench "crc24" $ whnf crc24 "test" | 14 | bgroup "crc" [ |
15 | bench "crc24" $ whnf crc24 "test" | ||
16 | , bench "crc24Lazy" $ whnf crc24Lazy "test" | ||
15 | ] | 17 | ] |
16 | ] | 18 | ] |