Nicholas Barratt wrote:
>                str.append("name=\""+name+'"');
>   -            str.append(",ch="+ch);
>   +            str.append(",ch=");
>   +            str.append(ch);
>                str.append(",position="+position);
>                str.append(",count="+count);

This isn't really needed that much since this method
is only there for debugging purposes and would not be
called in general operation. Besides, if you want to
make this kind of change to avoid having the compiler
generate additional StringBuffer objects, you should
change *all* of the occurrences of string concats.

But my opinion is that this inefficiency is fine for
debugging and error messages since these occur rarely.
However, if this kind of thing were in the inner loop
of the scanner, then we would definitely want to
reconsider the approach and try to be as efficient as
possible.

-- 
Andy Clark * [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to