velocity-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juozas Baliuka" <bali...@mail.lt>
Subject Re: [PATCH] optimization
Date Mon, 26 Aug 2002 19:39:15 GMT

"stateStackPush/stateStackPop" are used almost for all "actions"
...........................................................................
        lparen = ( (Integer) h.get("lparen")).intValue();
        rparen = ( (Integer) h.get("rparen")).intValue();

        SwitchTo( ( (Integer) h.get("lexstate")).intValue() );
...................................................................

it is possible to optimize Hastable stuff  with some trivial class:

 private static class State{
           int lparen ;
           int rparen ;
           int lexstate;
     public String toString(){ //for debug }
 }
 
 ..........................................
         lparen = state.lparen;
         rparen = state.rparen;
 ..........................................

    or :
   -  h = (Hashtable) stateStack.pop();
   + this.currentState = (State) stateStack.pop();





<snip>


--
To unsubscribe, e-mail:   <mailto:velocity-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-dev-help@jakarta.apache.org>


Mime
View raw message