RFR: 8372845: Fold identity hash code if object is constant
Vladimir Ivanov
vlivanov at openjdk.org
Tue Dec 2 02:26:46 UTC 2025
On Mon, 1 Dec 2025 23:01:08 GMT, Chen Liang <liach at openjdk.org> wrote:
> Folding identity hash as constant if the incoming argument is constant would be useful for quick map lookups, such as for the [Classifier proposal](https://openjdk.org/jeps/8357674). Currently, identity hash is not constant because it loads the object header/mark word. We can add an explicit bypass to load an existing hash eagerly instead.
@liach Thanks for taking care of the fix. Here's a more polished version:
https://github.com/openjdk/jdk/commit/c6c4e9f23a1bdf801d0cc8e36f343543b8bfccda
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28589#issuecomment-3599884931
More information about the hotspot-compiler-dev
mailing list