patch applied (ghc-6.8/packages/bytestring): Remove one indirection
in the representation of lazy ByteString
Duncan Coutts
duncan.coutts at worc.ox.ac.uk
Thu Sep 6 18:02:11 EDT 2007
Thu Sep 6 11:11:42 PDT 2007 Duncan Coutts <duncan at haskell.org>
* Remove one indirection in the representation of lazy ByteString
Instead of:
newtype ByteString = LPS [S.ByteString]
we have:
data ByteString = Empty | Chunk {-# UNPACK #-} !S.ByteString ByteString
That is, the strict ByteString element is unpacked into the Chunk constructor
so it's now just one pointer to get to the data rather than having to look
up the S.ByteString cons element and then follow the pointer to the data.
Combined with SpecConstr we should be able to get some good speed improvements.
M ./Data/ByteString/Fusion.hs -6 +7
M ./Data/ByteString/Lazy.hs -313 +338
M ./Data/ByteString/Lazy/Char8.hs -77 +78
M ./Data/ByteString/Lazy/Internal.hs -59 +37
M ./tests/Properties.hs -2 +2
M ./tests/QuickCheckUtils.hs -8 +8
More information about the Cvs-libraries
mailing list