Related articles |
---|
Q:How to Speedup yacc based parsers? Venkateswara.Rao@cho.ge.com (Venkateswara Rao) (1997-03-07) |
Re: Q:How to Speedup yacc based parsers? john_reiser@MENTORG.COM (1997-03-14) |
Re: Q:How to Speedup yacc based parsers? johnmce@world.std.com (1997-03-16) |
Re: Q:How to Speedup yacc based parsers? jlilley@empathy.com (John Lilley) (1997-03-16) |
Re: Q:How to Speedup yacc based parsers? krotoff@boy.nmd.msu.ru (Alexander Krotoff) (1997-03-16) |
Re: Q:How to Speedup yacc based parsers? thetick@scruz.net (Scott Stanchfield) (1997-03-18) |
Re: Q:How to Speedup yacc based parsers? cdc@cosc.canterbury.ac.nz (Carl Cerecke) (1997-03-21) |
From: | John Lilley <jlilley@empathy.com> |
Newsgroups: | comp.compilers |
Date: | 16 Mar 1997 23:33:15 -0500 |
Organization: | Nerds for Hire, Inc. |
References: | 97-03-036 97-03-067 |
Keywords: | parse, performance |
> Venkateswara Rao (Venkateswara.Rao@cho.ge.com) wrote:
> : I am working on a large parser (yacc based). I was wondering whether I
> : can get some tips from the old hands in the group to improve on speed.
In addition to the already-mentioned tips, you may want to look at
some things outside of the YACC realm:
1) The amount of time spent in symbol table management and AST
generation. Simply allocating the AST nodes can be a bottleneck.
Your raw parser may or may not be significant compared to other
processing.
2) Try recursive-descent. LL(k) is suitable for many grammars and can
be significantly faster than LALR, since it lacks the large tables
that LALR requires. If your grammar is LL(1) or LL(2) it may be much
faster when written as recursive-descent. Of course, there is often
considerable effort involved in transforming an LALR grammar into an
LL grammar. PCCTS is a good tool for producing LL(k) parsers, as it
allows you to work around the nasty parts using backtracking or
predication.
john lilley
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.