Re: Lex start flags performance

wim vandenhaute <>
7 Dec 2001 23:40:10 -0500

          From comp.compilers

Related articles
Lex start flags performance (wim vandenhaute) (2001-11-26)
Re: Lex start flags performance (wim vandenhaute) (2001-12-07)
| List of all articles for this month |

From: wim vandenhaute <>
Newsgroups: comp.compilers
Date: 7 Dec 2001 23:40:10 -0500
Organization: Alcatel
References: 01-11-124
Keywords: lex, performance
Posted-Date: 07 Dec 2001 23:40:10 EST

wim vandenhaute wrote:

> So far the parser i used (coded in lex and yacc) used simple int flags
> for distinction between different file formats the parser has to be
> capable to process After a revision we decided to replace these int
> flags by the start conditions for left context sensitivity (%start
> SwavParser ... )
> Is there a way by which I can be sure that this will gain me
> performance improvement. Is there a best way on how to do it ?

We solved it and gained 50% gain because of one who wasn't done with a
start condition but still with a regular int flag. Because of that
lex always first when through these rules and parsed some stuff which
was then rejected because of the int flag. Now with the start
condition it knew it had to reject it before it read it so that gave
us this huge gain.

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.