RFR: 8357823: Changes in StringBuilder (JDK-8351443) caused a 1-3% regression in biojava

Roger Riggs rriggs at openjdk.org
Wed Jun 11 11:11:33 UTC 2025


On Mon, 2 Jun 2025 23:32:39 GMT, Shaojin Wen <swen at openjdk.org> wrote:

> The performance figures under x64 show that the performance of StringBuilders.appendWithIntLatin1 scenario drops by about 6%, but the performance of StringBuilders.appendWithLongLatin1 does not drop.

All of the JMH tests for StringBuilders.appendWith* are unreliable. 
They modify StringBuilders (sbLatin1 and sbUtf16) that are supposed to be read-only by calling `setLength(0)`.
As a result, depending on the order of execution of the benchmarks, the buffer may or may not have to be re-sized.
fyi, That may not account for all of the differences.

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

PR Comment: https://git.openjdk.org/jdk/pull/25550#issuecomment-2962261862


More information about the core-libs-dev mailing list