RFR: 8371656: HashMap.putAll() optimizations [v3]

jengebr duke at openjdk.org
Wed Feb 11 13:50:09 UTC 2026


On Wed, 4 Feb 2026 21:08:00 GMT, Rémi Forax <forax at openjdk.org> wrote:

>> jengebr has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
>> 
>>  - Merge branch 'openjdk:master' into putMapEntriesOptimizations
>>  - Unit test revisions
>>  - Bug fix & unit test
>>  - fixing whitespace
>>  - Optimizing HashMap.putAll() and .<init> for HashMap and C$UM
>
> src/java.base/share/classes/java/util/HashMap.java line 516:
> 
>> 514:      */
>> 515:     final void putMapEntries(Map<? extends K, ? extends V> m, boolean evict) {
>> 516:         if (m.getClass() == Collections.UnmodifiableMap.class) {
> 
> I would address that issue in a separate bug.

What issue?  This is an integral part of the performance optimization.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28243#discussion_r2793389419


More information about the core-libs-dev mailing list