On Wed, 30 Apr 2025 18:01:08 GMT, Shaojin Wen <s...@openjdk.org> wrote:
> Similar to #24959, java.util.Locale.hashCode can also make the same > improvement. > > Replace manual bitwise operations in hashCode implementations of > java.util.Locale with Double::hashCode. src/java.base/share/classes/java/util/Locale.java line 3500: > 3498: h = 17; > 3499: h = 37*h + range.hashCode(); > 3500: h = 37*h + > Long.hashCode(Double.doubleToLongBits(weight)); Suggestion: h = 37*h + Double.hashCode(weight); These are equivalent. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24971#discussion_r2069218063