RE: JavaMemoryModel: Mutually exclusive goals for Java memory model

From: Doug Lea (
Date: Fri Apr 19 2002 - 06:15:24 EDT

> I must admit that this strikes me as being independently valuable,
> if only because it might open up some opportunities for better
> integration of StringBuffers (and maybe Strings) with the new
> java.nio.CharBuffers.

Do you (or anyone) have any performance data comparing concatenation
followed by String construction in nio CharBuffers vs StringBuffers?
If this were faster, given that it already exists, it is tempting to
just redefine String "+" to use CharBuffers, to replace nearly all
current uses of StringBuffer with CharBuffer inside JDK library
classes, and to encourage programmers to do likewise.

If it isn't faster, maybe something could be done (in next nio JSR)
to make it faster.

JavaMemoryModel mailing list -

This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:39 EDT