RFR: 6805750: Improve handling of Attributes.Name
claes.redestad at oracle.com
Sun Apr 22 21:40:16 UTC 2018
On 2018-04-20 19:41, Xueming Shen wrote:
> It loogsk good.
> One minor nit is that the "hashCode" check in Name.equals() might not
> be really
> necessary, given in most/normal use scenario the "Name" is used as a
> key in
> Attributes.map, which is a LinkedHashMap. Arguably the hashcode should be
> check already during lookup.
Agreed; I hadn't analyzed that particular check and seems it costs more
cased than it would ever save us in the presence of excessive hash
collisions. I'll remove
it before push.
More information about the core-libs-dev