On Mon, 17 Oct 2022 09:38:01 GMT, Сергей Цыпанов wrote:
>> I saw this code many times and always thought that it exists for performance
>> purposes, to avoid extra indirection via likely megamorphic naturalOrder
>> comparator which will slow down the operations on common path. I think such
>>
On Sun, 16 Oct 2022 19:43:54 GMT, Tagir F. Valeev wrote:
>> Сергей Цыпанов has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Update src/java.base/share/classes/java/util/TreeMap.java
>>
>> Co-authored-by: ExE Boss <3889017+exe-b...@us
On Fri, 14 Oct 2022 19:03:11 GMT, Сергей Цыпанов wrote:
>> We can use `Comparator.naturalOrder()` for cases when a `TreeMap` instance
>> is constructed without comparator. This allows to squash two branches in
>> `TreeMap.get()` into one.
>>
>> P.S. I think the comment of `TreeMap.getEntryUsin
> We can use `Comparator.naturalOrder()` for cases when a `TreeMap` instance is
> constructed without comparator. This allows to squash two branches in
> `TreeMap.get()` into one.
>
> P.S. I think the comment of `TreeMap.getEntryUsingComparator()` is outdated.
> Should we also change it?
Серге