[antlr-interest] we can do push/pop error stuff for 4%

Sohail Somani sohail at taggedtype.net
Sat May 27 12:44:56 PDT 2006


On Sat, 2006-05-27 at 12:27 -0700, Terence Parr wrote:
> Hi, so implemented my own stack and it's way faster.
> 
> parse+lex 6261ms	using java.util.Stack
> parse+lex 3710ms	using no push/pop at all
> parse+lex 3860ms	using my own stack
> 
> Given that lexing is like 1500ms, adding good error handling,  
> recovery only costs us about 150ms or 4% cpu speed.  I'll leave in,  
> but make it to use my stack.  Wow.  My stack costs 150ms vs 2551ms  
> for java.util.Stack.  What the hell is it doing?  ick.

Aren't java containers thread safe or something? Might be
synchronize(this) or something like that...



More information about the antlr-interest mailing list