On Thu, 6 Mar 2025 00:39:59 GMT, Vladimir Ivanov <vaiva...@openjdk.org> wrote:
>> test/micro/org/openjdk/bench/java/lang/foreign/StrLenTest.java line 149: >> >>> 147: while (lorem.length() < size) { >>> 148: lorem += lorem; >>> 149: } >> >> This is matter of taste, but I would prefer StringBuilder instead: >> >> StringBuilder builder = new StringBuilder(lorem.length()+size); >> for (int l = 0; l<size; l+=lorem.length()) { >> builder.append(lorem); >> } >> return builder.substring(0, size); > > The initial version looks more readable for me. > While it initialization part no need to tune performance here and simple > version should be OK. Sounds good ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23873#discussion_r1982387796