JDK-8173585 : Intrinsify StringLatin1.indexOf(char)
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9,10
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2017-01-27
  • Updated: 2021-06-18
  • Resolved: 2020-10-14
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 16
16 b20Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
This seems to be missing. See the discussion here:

Please also consider backporting it to 9u.
Changeset: f71e8a61 Author: Jason Tatton (AWS) <jptatton@amazon.com> Committer: Paul Hohensee <phh@openjdk.org> Date: 2020-10-14 12:58:21 +0000 URL: https://git.openjdk.java.net/jdk/commit/f71e8a61

I'm sponsoring this issue for Jason Tatton, jptatton@amazon.com.

The intrinsic for StringUTF16.indexOf(char) was added with Compact Strings (JDK-8054307) because the Java implementation performed worse with the new byte array implementation of Strings. Performance for StringLatin1.indexOf(char) should not be affected, so this is not a regression. However, I agree that we should add an intrinsic for StringLatin1 as well to avoid the reported performance difference between indexOf(String) and indexOf(char). Targeting this to JDK 10.