RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86

Claes Redestad redestad at openjdk.java.net
Fri Sep 24 16:04:08 UTC 2021

On Thu, 23 Sep 2021 00:03:55 GMT, Claes Redestad <redestad at openjdk.org> wrote:

> This can probably be simplified further, say by adding a flag to the intrinsic of whether we're encoding ASCII only or ISO-8859-1.

Done: Removed the addition of a new C2 Node, merged the macro assembler encode_iso_array and encode_ascii_array and added a predicate to select the behavior.

> It also needs to be implemented and tested on all architectures.

Implementing this on other hardware is Future Work. The non-x86 intrinsics for implEncodeISOArray all seem to use clever tricks rather than a simple mask that can be easily switched from detecting non-latin-1(0xFF00) to detecting ASCII (0xFF80). Clever tricks make it rather challenging to extend this like I could easily do in the x86 code (most all assembler is foreign to me)


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

More information about the core-libs-dev mailing list