[antlr-interest] Re: Exception tests eat performance?
Terence Parr
parrt at cs.usfca.edu
Fri Jan 9 09:49:17 PST 2004
On Friday, January 9, 2004, at 07:11 AM, Anton Safonov wrote:
> My two bits - in RefactorIT we succeeded to speed antlr up many times.
> Generated lexer was frozen at some point and the changes and
> optimizations were hardcoded :( Unfortunately nobody remembers anymore
> what exactly was done there, but I have CVS logs at hand :) May be I
> will post some hints when will be upgrading to 3.0.
Great!
> As for the parser, intermediate class was introduced and the original
> generated parser class is postprocessed in Ant target by replacing some
> strings:
> - extends clause - replaced LLkParser with our superclass
> - tokens are read altogether into array and consume(), LL() & LT() etc.
> work with the array
Interesting...this is what PCCTS did originally when syn preds were
used.
> - ASTPair is stored in a pool and not generated in every rule
> - LA(1) is replaced with a field usage
> ...
> just take a look inside with a proper profiler
Thanks for the hints, Anton. Be assured that the next system will pay
careful attention to speed. I anticipate multiple options to control
code generation that will allow you to turn the knob from
readable/flexible to less-readable/hardcoded for speed.
RefactorIT looks like a great product...have you posted to the showcase
at antlr.org?
Best regards,
Terence
--
Professor Comp. Sci., University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Co-founder, http://www.jguru.com
Co-founder, http://www.knowspam.net enjoy email again!
Co-founder, http://www.peerscope.com link sharing, pure-n-simple
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list