RFR: 8281631: HashMap.putAll can cause redundant space waste
XenoAmess
duke at openjdk.java.net
Fri Feb 11 09:00:31 UTC 2022
On Thu, 10 Feb 2022 17:46:36 GMT, XenoAmess <duke at openjdk.java.net> wrote:
> 8281631: HashMap.putAll can cause redundant space waste
According to the discussion at mailing list, we decide to try only change the calculation inside HashMap and WeakHashMap, and see what would happen.
The next step is fixing all such **size/0.75+1** in jdk (expected several hundreds places...)
I investigated most of the usages.
They just give a size, and get a capacity, even not change the 0.75
So maybe we can use some int calculation to replace the 0.75, thus replace Math.ceil for such situations.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7431
More information about the core-libs-dev
mailing list