3 ms·
> 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 pa
by sakras 4y ago
> 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.