[lworld] Integrated: 8378375: [lworld] System.identityHashCode for value objects should vary by its class

Roger Riggs rriggs at openjdk.org
Fri Feb 27 16:23:18 UTC 2026


On Wed, 25 Feb 2026 18:10:40 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

> System.identityHashCode for value instance should include a salt value that varies by class.
> This improves the distribution of hashcodes for value classes with similar primitive fields.
> The class hashCode is a decent salt value and is readily available.

This pull request has now been integrated.

Changeset: f3218135
Author:    Roger Riggs <rriggs at openjdk.org>
URL:       https://git.openjdk.org/valhalla/commit/f321813503a1c58f83b382fbbf2f21a1f92a9239
Stats:     13 lines in 1 file changed: 0 ins; 12 del; 1 mod

8378375: [lworld] System.identityHashCode for value objects should vary by its class

Reviewed-by: liach, phubner

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

PR: https://git.openjdk.org/valhalla/pull/2169


More information about the valhalla-dev mailing list