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

Gracjan Polak gracjanpolak at gmail.com
Tue Dec 11 08:27:44 EST 2007

I'm happy to announce a ReadP style parser for ByteStrings,


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.


     * 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!


More information about the Haskell-Cafe mailing list