Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end From: anton@mips.complang.tuwien.ac.at (Anton Ertl) Newsgroups: comp.compilers Subject: Re: Bison =?UTF-8?B?ZGV0ZXJtaW5pc+KAi3RpYyBMQUxSKDEpIHBhcnNlciBm?= =?UTF-8?B?b3IgSmF2YS9DKysgKGtpbmQgb2YgY29tcGxleCBsYW5nYXVnZSkgd2l0aG91dCA=?= =?UTF-8?B?J2xleGFyIGhhY2snIHN1cHBvcnQ=?= Date: Mon, 20 Aug 2012 13:35:57 GMT Organization: Institut fuer Computersprachen, Technische Universitaet Wien Lines: 25 Sender: johnl@iecc.com Approved: comp.compilers@iecc.com Message-ID: <12-08-009@comp.compilers> References: <12-08-005@comp.compilers> <12-08-006@comp.compilers> NNTP-Posting-Host: news.iecc.com X-Trace: leila.iecc.com 1345514763 92562 64.57.183.58 (21 Aug 2012 02:06:03 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Tue, 21 Aug 2012 02:06:03 +0000 (UTC) Keywords: bison, design performance Posted-Date: 20 Aug 2012 22:06:03 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:726 Hans-Peter Diettrich writes: >> [Get it working in bison, then in the unlikely event that's not fast >> enough, profile your compiler to see where it's spending its time and >> fix what needs to be fixed. Although in theory GLR can be very slow, >> in practice the ambiguities are generally resolved within a few tokens >> and the performance is fine. compilers always spend way more time in >> the lexer than the parser anyway. Writing RD parsers by hand can be >> fun, but you never know what language it actually parses. -John] > >There exist parser generators for several models. I also doubt that - >except in misdesigned C-ish languages - a compiler spends significant >time in the lexer. This may be true for dummy parsers, which do >nothing but syntax checks, but not for compilers with code generation, >optimization and more. Code generation and optimization do not change the relation between the time spent in scanning and in parsing. Moreover, if the compiler spends most of the time in code generation, optimization and/or "more", there is even less reason to worry about parsing speed. - anton -- M. Anton Ertl anton@mips.complang.tuwien.ac.at http://www.complang.tuwien.ac.at/anton/