inlining and string concatenation

Cedric Berger cedric@wireless-networks.com
Mon May 1 16:13:00 GMT 2000


Tom Tromey wrote:
> Thanks. I assume some of the common benchmarks must look at this?
> I'm also curious to know how much this will help us in real code.
> Implementing it is a fair amount of effort...

It might help a lot for things like poorly-written servlets, with tons
of html/xml code generated like println("<TITLE>+title+...);
On the other hand, most experienced programmers have learned to
optimize this kind of code by instanciating StringBuffers directly:
sb = new StringBuffer(50); sb.append(....)
But all in all, I think string concatenation is common enough in typical
code that a 50% increase of performances for this operation will be
noticed.
Cedric


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /