RFR: 8305811: (bf) Improve heap buffer performance of CharBuffer::append(CharSequence)

Roger Riggs rriggs at openjdk.org
Tue Apr 11 16:55:32 UTC 2023


On Tue, 11 Apr 2023 16:24:53 GMT, Ismael Juma <duke at openjdk.org> wrote:

> It is odd that `StringBuilder` is so much slower than `StringBuffer` before this PR. Is there a plausible explanation for that?

Not too odd, most methods in StringBuilder are synchronized, so there's an extra overhead of every call.
StringBuffer was replaced by StringBuilder specifically to avoid that overhead.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/13415#issuecomment-1503769734


More information about the nio-dev mailing list