News for hackers. Stuff that matters.
Re:We Need to Know LR and Recursive Descent Parsing Techniques by sakras on Tuesday January 17, 2023 @12:46PM (#34415766)
> The first is performance. Although there aren't, to the best of my knowledge, modern performance numbers, it is reasonable to assume that recursive descent parsing is generally faster than LR parsing.

Why is this safe to assume? My understanding is that shift-reduce parsers in general are faster than recursive-descent ones because they have a constant overhead per production rule, rather than potentially repeatedly creating a tree and then bailing out to try a different production rule if it doesn’t work.

There are no comments on this comment yet.