purescript-contrib/purescript-parsing

`Text.Parsing.Parser.String.string` parser efficiency

Closed this issue · 1 comments

case indexOf (wrap str) input of
Just 0 -> do

Does this scan all the way to the end of the input string, looking for a match, even though it already knows it failed when it doesn't find a match at index 0? If that's what it's doing, that would be very inefficient.

This was fixed in #93, but we haven’t released the new version of the library yet. Good catch, though!