RFR: 8268363: AArch64: Implement string_indexof_char intrinsic in SVE [v2]

TatWai Chong github.com+78814694+tatwaichong at openjdk.java.net
Tue Jun 29 08:27:43 UTC 2021


> This patch implements string_indexof_char intrinsic in SVE for both
> UTF-16 and Latin-8 variants. In the current underneath implementation,
> there is only 4 and 8 characters are compared at a time in UTF-16 and
> Latin-8 respectively. In this patch, we adopt SVE to vectorize this
> intrinsic so that a wider comparison can be performed each time.
> 
> I've run [1] with this patch on an SVE machine, and the performance of
> StringIndexOfChar.latin1_mixed_char (length=65) and
> StringIndexOfChar.utf16_mixed_char (length=65) are improved significantly,
> while no visible regression for other cases with shorter strings.
> (length=7, 8, 15, 16 and 32)
> 
> [1] https://github.com/openjdk/jdk/blob/master/test/micro/org/openjdk/bench/java/lang/StringIndexOfChar.java

TatWai Chong has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:

 - Merge branch 'openjdk:master' into indexofchar
 - 8268363: AArch64: Implement string_indexof_char intrinsic in SVE
   
   This patch implements string_indexof_char intrinsic in SVE for both
   UTF-16 and Latin-8 variants. In the current underneath implementation,
   there is only 4 and 8 characters are compared at a time in UTF-16 and
   Latin-8 respectively. In this patch, we adopt SVE to vectorize this
   intrinsic so that a wider comparison can be performed each time.
   
   I've run [1] with this patch on an SVE machine, and the performance of
   StringIndexOfChar.latin1_mixed_char (length=65) and
   StringIndexOfChar.utf16_mixed_char (length=65) are improved significantly,
   while no visible regression for other cases with shorter strings.
   (length=7, 8, 15, 16 and 32)
   
   [1] https://github.com/openjdk/jdk/blob/master/test/micro/org/openjdk/bench/java/lang/StringIndexOfChar.java

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/4567/files
  - new: https://git.openjdk.java.net/jdk/pull/4567/files/623e5196..c5d42347

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4567&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4567&range=00-01

  Stats: 18347 lines in 536 files changed: 6867 ins; 9698 del; 1782 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4567.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4567/head:pull/4567

PR: https://git.openjdk.java.net/jdk/pull/4567


More information about the hotspot-compiler-dev mailing list