[Divunal-devel] StringBuffers/string manipulation optimization

Glyph Lefkowitz glyph@divunal.com
Thu, 24 Jun 1999 18:59:11 -0400 (EDT)


On Thu, 24 Jun 1999, James Knight wrote:

> If you have been writing verbs that do lots of String manipulation (okay,
> this applies to almost all verbs. :P), this is for you...
> In java,
> String buffers are used by the compiler to implement the binary string
> concatenation operator +. For example, the code:
>   String x = "a" + 4 + "c";
> is compiled to the equivalent of:
>   String x = new StringBuffer().append("a").append(4).append("c").toString();
> ...

Thank you for an insightful piece of technical advice!! (I didn't know
this) I think we should include something like that on the TR development
pages (perhaps we should start a "technotes" section once
twistedmatrix.com gets going? :-)