[antlr-dev] Re: [antlr-interest] generating cyclic state machines in Java

Terence Parr parrt at cs.usfca.edu
Fri Feb 10 12:49:45 PST 2006


On Feb 9, 2006, at 3:00 PM, Martin Probst wrote:

>> I hope!  I am also going to probably allocate one big 1D array and
>> then simulate the 2D array rather than let it create n arrays for n
>> DFA states.  Slows down GC etc...
>
> The two rules of optimisation:
> 1. Don't do it
> 2. (for experts) Don't do it yet
>
> Why not get a working system and benchmark it first?

Exactly what I was doing to do ;)  I was going to do the obvious  
first with the caveat that I must be able to limit the size of each  
state, deferring to a complicated hetergeneous state for unicode and  
predicates.

> In my experience
> the JIT & friends always behave different from what you'd expect ...

yup...

Ter


More information about the antlr-interest mailing list