On Jul 15, 2008, at 09:16, Peter B. West wrote:
Andreas Delmelle wrote:
<snip />
Come 1.5, you get StringBuilder.
Yep, this indeed becomes /the/ weapon of choice for building strings
(in single-threaded context), if that's the goal.
For FOText, I don't think that is the goal. We're simply buffering
accumulating characters there, and in that case, a CharBuffer seems
much more appropriate (even in Java 1.5+).
Not sure what explains the drop in performance in Sun Java 1.6
though... For Harmony, I guess the implementation has not yet been
optimized. Understandable, especially if CharBuffer is not commonly
used.
Cheers
Andreas