RFR: 8305774: String.join(CharSequence, Iterable) can be optimized if Iterable is a Collection [v2]
Tingjun Yuan
duke at openjdk.org
Sun Apr 9 02:40:45 UTC 2023
On Sun, 9 Apr 2023 02:33:07 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Tingjun Yuan has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add benchmark
>
> This appears to be a 4% improvement for non-concurrent structures like ArrayList or LinkedHashSet, if we ignore the baseline difference (for Iterable). This is anticipated as the growth of array size is exponential, so the total allocation is effectively O(N log(N)). Can you try with smaller quantities, like single-digit or double digits length, which may be more frequent in application?
@liach Working on that.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13383#issuecomment-1501024117
More information about the core-libs-dev
mailing list