[Haskell-cafe] Impact of "try" on Parsec performance

Malcolm Wallace malcolm.wallace at me.com
Sat Mar 3 12:45:34 CET 2012

On 3 Mar 2012, at 04:30, Omari Norman wrote:
> On the other hand, I notice that attoparsec and polyparse backtrack by default, and attoparsec claims to be faster than Parsec (I can't remember if polyparse makes this claim).

In my benchmarks, polyparse has about the same performance as Parsec, when using the monadic style (possibly a very tiny bit faster).  But polyparse is hugely, asymptotically, faster than Parsec when your parser is written in applicative style, your input text is large, and you consume the parse results lazily.


More information about the Haskell-Cafe mailing list