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: 2024-02-06
  • 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 :  
Relates :  
Description
This seems to be missing. See the discussion here:
 http://mail.openjdk.java.net/pipermail/jdk9-dev/2017-January/005539.html

Please also consider backporting it to 9u.
Comments
Fix Request (11u): This is a missing performance improvement for strings on aarch64 and x86. Original patch did not apply cleanly because macroAssembler files have old names in 11u and vmIntrinsics.*pp part is vmSymbols.*pp. The intrinsic code is the same. PR: https://github.com/openjdk/jdk11u-dev/pull/41 Mandatory follow-ups for 11u are: JDK-8254775, JDK-8255274, JDK-8254785, JDK-8254782. Testing for the entire patch train: tier1, tier2, compiler/intrinsics/string/TestStringLatin1IndexOfChar.java, graalunit with Graal on. x86 and aarch64 builds.
25-10-2021

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
14-10-2020

I'm sponsoring this issue for Jason Tatton, jptatton@amazon.com.
06-08-2020

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.
30-01-2017