[commit: packages/binary] master: benchmark builder: Specify Int as we otherwise default to Integer. (0388304)
git at git.haskell.org
git at git.haskell.org
Wed Dec 16 09:43:11 UTC 2015
Repository : ssh://git@git.haskell.org/binary
On branch : master
Link : http://git.haskell.org/packages/binary.git/commitdiff/038830410c1880e337cbfd85343ca78d07b11180
>---------------------------------------------------------------
commit 038830410c1880e337cbfd85343ca78d07b11180
Author: Lennart Kolmodin <kolmodin at google.com>
Date: Fri Aug 14 22:31:12 2015 +0200
benchmark builder: Specify Int as we otherwise default to Integer.
The benchmark executes 25% faster, time which could not be attribute to
the speed of binary itself.
>---------------------------------------------------------------
038830410c1880e337cbfd85343ca78d07b11180
benchmarks/Builder.hs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/benchmarks/Builder.hs b/benchmarks/Builder.hs
index ad08e16..3c48e7b 100644
--- a/benchmarks/Builder.hs
+++ b/benchmarks/Builder.hs
@@ -86,7 +86,7 @@ from4Word8s (x:xs) = singleton x <> singleton x <> singleton x <> singleton x <>
-- Write 100 short, length-prefixed ByteStrings.
lengthPrefixedBS :: S.ByteString -> Builder
-lengthPrefixedBS bs = loop 100
+lengthPrefixedBS bs = loop (100 :: Int)
where loop n | n `seq` False = undefined
loop 0 = mempty
loop n =
More information about the ghc-commits
mailing list