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

S D Swierstra doaitse at uu.nl
Sun Mar 4 20:37:47 CET 2012


On Mar 3, 2012, at 12:45 , Malcolm Wallace wrote:

> 
> 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.

As is the case for the u-parsinglib ;-}

 Doaiyse


> 
> Regards,
>    Malcolm
> 
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe




More information about the Haskell-Cafe mailing list