On Fri, 12 Jan 2024 08:51:16 GMT, Volker Simonis <simo...@openjdk.org> wrote:

>>> tryPresize(int size) is doing and if its size argument is supposed to 
>>> contain the additional number of elements which will be inserted into the 
>>> hash map or if it is a hint for the new total size of the hash map
>> 
>> Argument `size` for `tryPresize()` is a hint for the **new total size** of 
>> the hash map. If the size is too small compared to the current size of the 
>> map, there will be no resizing.
>
> Thanks. In that case, calling `tryPresize()` with `size < this.size()` 
> doesn't make sense and we should call it with `this.size() + m.size()`.

Thanks. Just committed this change. Also added a new benchmark for `putAll()` 
and the results in the top post.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17116#discussion_r1456490539

Reply via email to