RFR: 8371164: ArrayList.addAll() optimizations

jengebr duke at openjdk.org
Tue Nov 4 14:50:36 UTC 2025


On Tue, 4 Nov 2025 14:05:32 GMT, jengebr <duke at openjdk.org> wrote:

>> All overriding methods should, yes. Also, there is slight a mismatch between the title and the contents of the PR: it's not only about `ArrayList`.
>
>>  Also, there is slight a mismatch between the title and the contents of the PR: it's not only about ArrayList
> 
> This is a bit of a grey area - it's not only about ArrayList, rather it's only about ArrayList.addAll().  One of the improvements is to the method itself, another is to the critical downstream method.  This is demonstrated by the benchmark, which only calls ArrayList.addAll().
> 
> I'd rather leave it as-is since it describes the purpose of the optimization.

> Should these have @Override?

Will fix

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28116#discussion_r2490809800


More information about the core-libs-dev mailing list