Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!mintaka!spdcc!iecc!compilers-sender From: melling@psuvax1.cs.psu.edu (Michael D Mellinger) Newsgroups: comp.compilers Subject: Recursive Descent Parsers and YACC Keywords: parse, yacc, design, question Message-ID: Date: 15 Nov 90 22:43:37 GMT Sender: compilers-sender@iecc.cambridge.ma.us Reply-To: melling@psuvax1.cs.psu.edu (Michael D Mellinger) Organization: Penn State Computer Science Lines: 18 Approved: compilers@iecc.cambridge.ma.us Can someone give me an estimate on how much faster parsing can be made by writing a recursive-descent parser instead of using Yacc and Lex? Is there enough of a difference to consider using a RDP in a commercial C compiler? PC compilers seem to be very fast when compared to workstation compilers such as GCC. Is optimization(or lack of) the crucial difference in PC and workstation compilation speeds? -Mike [It is my distinct impression that yacc parsers work fairly quickly. Particularly on machines with slow procedure calls, they can be faster than recursive descent. Lex is slow, but flex uses newer techniques so that it is usually as fast as a hand-coded lexer. Unix compilers are slow because they use a separate assembly pass and do more optimizations. If you use, e.g., MS C with all of its optimization options it's no speed demon, either. -John] -- Send compilers articles to compilers@iecc.cambridge.ma.us or {ima | spdcc | world}!iecc!compilers. Meta-mail to compilers-request.