[Haskell-cafe] ANNOUNCE: A ReadP style parser for ByteStrings

Don Stewart dons at galois.com
Wed Dec 12 15:55:01 EST 2007

> I'm happy to announce a ReadP style parser for ByteStrings,
> Text.ParserCombinators.ReadP.ByteString.
> http://hackage.haskell.org/cgi-bin/hackage-scripts/package/bytestringreadp
> Text.ParserCombinators.ReadP.ByteString is an adaptation of
> Text.ParserCombinators.ReadP to work over Data.ByteString as input
> stream representation. This gives enormous improvements in terms of
> parsing speed but most significantly in memory usage.
> Features:
>      * ReadP style parser over ByteString input
>      * Drop-in replacement for Text.ParserCombinators.ReadP
>      * Fast
>      * Good memory usage
> The algorithm is slightly modified to exploit ByteString as random access
> data input structure. Unlike original ReadP, that stressed garbage collection 
> very much by creating a lot of conses (:), this parser has very good memory
> allocation behaviour.
> Package works out of the box with GHC 6.8.1, with slight (cabal) modifications
> also with GHC 6.6.1.
> Thanks to everyone for their support! Happy hacking!

Great work, Gracjan. I hope to try it out soon. I think this is the
first of the many bytestring parser projects started to actually get
released onto Hackage! Well done!

-- Don

More information about the Haskell-Cafe mailing list