JDK-6924259 : Remove String.count/String.offset/String.hashcode
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs17,1.4.0,5.0,6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,windows_nt,windows_xp
  • CPU: generic,x86
  • Submitted: 2010-02-08
  • Updated: 2017-11-25
  • Resolved: 2013-07-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8 Other
7u40Fixed 8Fixed hs23.2Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Investigate the performance impacts of removing String.count, String.offset,
and String.hashcode on various industry standard benchmarks.
There are no new regression tests for this change because the API is not impacted. It is a behind-the-scenes performance/implementation change only

EVALUATION http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/8f972594effc

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/8f972594effc

EVALUATION http://hg.openjdk.java.net/hsx/hsx23.2/hotspot/rev/3facbb14e873

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/8f972594effc

EVALUATION A working change has been developed that allows a version of the String class that doesn't use the count/offset fields. However, it's not possible to eliminate the hashcode field. This fix also works with compressed strings. At this point, the fix is on hold as other priorities have taken precedence.