RFR: 8371164: ArrayList.addAll() optimizations
jengebr
duke at openjdk.org
Tue Nov 4 14:08:51 UTC 2025
On Tue, 4 Nov 2025 12:04:40 GMT, Oli Gillespie <ogillespie at openjdk.org> wrote:
>> test/micro/org/openjdk/bench/java/util/ArrayListBulkOpsBenchmark.java line 120:
>>
>>> 118: ArrayList<String> result = new ArrayList<>(75);
>>> 119: result.addAll(linkedListSource75);
>>> 120: bh.consume(result);
>>
>> No need for blackholes, just return the result, it has the same effect I believe.
>
> (see https://shipilev.net/jvm/anatomy-quarks/27-compiler-blackholes/#_pure_java_blackholes)
Thanks, will incorporate these changes.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28116#discussion_r2490662114
More information about the core-libs-dev
mailing list