RFR: 8325730: StringBuilder.toString allocation for the empty String [v2]
Aleksey Shipilev
shade at openjdk.org
Tue Feb 20 18:15:05 UTC 2024
On Tue, 20 Feb 2024 18:00:42 GMT, Claes Redestad <redestad at openjdk.org> wrote:
>> test/micro/org/openjdk/bench/java/lang/StringBuffers.java line 49:
>>
>>> 47:
>>> 48: @Benchmark
>>> 49: public String emptyToString() {
>>
>> Do we actually need to remove the `substring` test here?
>
> I couldn't figure out why we'd want to have `String::substring` micros in a test `StringBuffers` (there's also a `StringSubstring` micro), though I could deal with that as an explicit cleanup RFE.
Yeah, I would like to keep this change clean for backports. Do the cleanup in a separate PR?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17931#discussion_r1496277852
More information about the core-libs-dev
mailing list