The switch to shared generation of native wrappers lost a C1 optimization for Object.hashCode. The identity hash code is stored in the header of objects and Object.hashCode is used to access it. Having to transition to native just to pull it out is extremely expensive. C1 had an optimization that would generate a special prologue for the native wrapper of Object.hashCode that would try to extract it if it could. Otherwise it would go the normal slow path. This was lost during the transition to shared native wrapper generation. C2 does this by emitting ideal which tests if hashCode has been overriden and tries the special case if it hasn't. That's slightly faster but would be complicated to emit in c1. We should simply restore the prologue in the native wrapper generation.
-
Tom Rodriguez
-
Tom Rodriguez
- Votes:
-
0 Vote for this issue
- Watchers:
-
0 Start watching this issue
- Created:
- Updated:
- Resolved:
- Imported:
- Indexed: