RFR: 8278302: [s390] Implement fast-path for ASCII-compatible CharsetEncoders [v3]

Lutz Schmidt lucy at openjdk.java.net
Tue Jan 18 16:12:12 UTC 2022


> This pull request contains the s390x variant of the fast-path for ASCII-compatible CharsetEncoders. 
> 
> The intrinsic implementation is pretty much similar to that of PPC64. Compared to the previously existing intrinsic implementation, changes to program logic are minimal. There is a new match rule for ascii strings and the bit mask used to detect invalid bits in the string characters is set depending on the target charset: 0xff00 for ISO, 0xff80 for ascii.
> 
> **Request:** SAP does not maintain a full build and test infrastructure for s390x anymore. Could somebody please test this PR on s390x? At least build and tier1 tests, the more the better. Thank you!
> 
> With my private testing (some microbenchmarks, some SPEC benchmarks) I could not find any issues. With the fast-path active I see a 2x, sometime 2.5x, improvement of CharsetEncodeDecode.encode. 
> 
> **Without the fast-path patch:**
> 
> CharsetEncodeDecode.encode   16384        UTF-8  avgt   30  16.350 ± 0.067  us/op
> CharsetEncodeDecode.encode   16384         BIG5  avgt   30  15.972 ± 0.136  us/op
> CharsetEncodeDecode.encode   16384  ISO-8859-15  avgt   30  14.372 ± 0.110  us/op
> CharsetEncodeDecode.encode   16384        ASCII  avgt   30  14.287 ± 0.051  us/op
> 
> 
> **With the fast-path patch:**
> 
> CharsetEncodeDecode.encode   16384        UTF-8  avgt   30   6.833 ± 0.064  us/op
> CharsetEncodeDecode.encode   16384         BIG5  avgt   30   8.195 ± 0.059  us/op
> CharsetEncodeDecode.encode   16384  ISO-8859-15  avgt   30   6.387 ± 0.149  us/op
> CharsetEncodeDecode.encode   16384        ASCII  avgt   30   6.321 ± 0.049  us/op

Lutz Schmidt has updated the pull request incrementally with one additional commit since the last revision:

  8278302: prevent compress call with toASCII true

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/6738/files
  - new: https://git.openjdk.java.net/jdk/pull/6738/files/a5305625..4326bf93

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

  Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6738.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6738/head:pull/6738

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


More information about the hotspot-compiler-dev mailing list