[antlr-interest] Performance and LA(int)
Paul J. Lucas
pauljlucas at mac.com
Wed Feb 23 18:19:07 PST 2005
On Wed, 23 Feb 2005, Paul J. Lucas wrote:
> Thought: could I override LA(int) in my own lexer and implement
> caching? When/how would I know to invalidate the cache? By
> also overriding consume()?
OK, so I did this. (I also overrode rewind() and made sure to
flush the cache whenever I push/pop a lexer.)
I got a 40% performance increase!
- Paul
More information about the antlr-interest
mailing list