Re: RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86 [v7]

2021-09-29 Thread Claes Redestad
On Tue, 28 Sep 2021 11:49:28 GMT, Volker Simonis wrote: >> Does the changes in 9800a99 resolve your concerns? > > In principle yes, but shouldn't the condition read: > > if (!Matcher::match_rule_supported(Op_EncodeISOArray) || > !Matcher::supports_encode_ascii_array) return false; > > I.e.

Re: RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86 [v7]

2021-09-29 Thread Claes Redestad
> This patch extends the `ISO_8859_1.implEncodeISOArray` intrinsic on x86 to > work also for ASCII encoding, which makes for example the `UTF_8$Encoder` > perform on par with (or outperform) similarly getting charset encoded bytes > from a String. The former took a small performance hit in JDK

Re: RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86 [v6]

2021-09-29 Thread Tobias Hartmann
On Wed, 29 Sep 2021 12:36:23 GMT, Claes Redestad wrote: >> This patch extends the `ISO_8859_1.implEncodeISOArray` intrinsic on x86 to >> work also for ASCII encoding, which makes for example the `UTF_8$Encoder` >> perform on par with (or outperform) similarly getting charset encoded bytes >>

Re: RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86 [v6]

2021-09-29 Thread Claes Redestad
On Mon, 27 Sep 2021 12:27:32 GMT, Tobias Hartmann wrote: >>> Should we remove the "iso" part from the method/class names? >> >> I'm open to suggestions, but I've not been able to think of anything better. >> `encodeISOOrASCII` doesn't seem helpful and since ASCII is a subset of the >>

Re: RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86 [v6]

2021-09-29 Thread Claes Redestad
> This patch extends the `ISO_8859_1.implEncodeISOArray` intrinsic on x86 to > work also for ASCII encoding, which makes for example the `UTF_8$Encoder` > perform on par with (or outperform) similarly getting charset encoded bytes > from a String. The former took a small performance hit in JDK

Re: RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86 [v5]

2021-09-28 Thread Tobias Hartmann
On Tue, 28 Sep 2021 11:49:29 GMT, Claes Redestad wrote: >> This patch extends the `ISO_8859_1.implEncodeISOArray` intrinsic on x86 to >> work also for ASCII encoding, which makes for example the `UTF_8$Encoder` >> perform on par with (or outperform) similarly getting charset encoded bytes >>

Re: RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86 [v5]

2021-09-28 Thread Claes Redestad
otspot-compiler-...@openjdk.java.net ; nio-...@openjdk.java.net Subject: Re: RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86 [v5] On Tue, 28 Sep 2021 10:01:43 GMT, Claes Redestad wrote: >> Not too much work. I recently introduced platform-specific `matcher_*.hpp`

Re: RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86 [v5]

2021-09-28 Thread Volker Simonis
On Tue, 28 Sep 2021 10:01:43 GMT, Claes Redestad wrote: >> Not too much work. I recently introduced platform-specific `matcher_*.hpp` >> files, so since then adding a boolean constant is easy (no need to muck with >> the .ad files). > > Does the changes in 9800a99 resolve your concerns? In

Re: RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86 [v5]

2021-09-28 Thread Claes Redestad
> This patch extends the `ISO_8859_1.implEncodeISOArray` intrinsic on x86 to > work also for ASCII encoding, which makes for example the `UTF_8$Encoder` > perform on par with (or outperform) similarly getting charset encoded bytes > from a String. The former took a small performance hit in JDK

Re: RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86 [v4]

2021-09-28 Thread Claes Redestad
> This patch extends the `ISO_8859_1.implEncodeISOArray` intrinsic on x86 to > work also for ASCII encoding, which makes for example the `UTF_8$Encoder` > perform on par with (or outperform) similarly getting charset encoded bytes > from a String. The former took a small performance hit in JDK

Re: RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86 [v3]

2021-09-28 Thread Claes Redestad
On Mon, 27 Sep 2021 12:11:22 GMT, Claes Redestad wrote: >> src/hotspot/share/opto/c2compiler.cpp line 222: >> >>> 220: #if !defined(X86) >>> 221: return false; // not yet implemented >>> 222: #endif >> >> It might be a little more work, but I think it's cleaner to move the >> decision

Re: RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86 [v3]

2021-09-27 Thread Claes Redestad
> This patch extends the `ISO_8859_1.implEncodeISOArray` intrinsic on x86 to > work also for ASCII encoding, which makes for example the `UTF_8$Encoder` > perform on par with (or outperform) similarly getting charset encoded bytes > from a String. The former took a small performance hit in JDK

Re: RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86 [v3]

2021-09-27 Thread Tobias Hartmann
On Mon, 27 Sep 2021 11:59:54 GMT, Claes Redestad wrote: > > Should we remove the "iso" part from the method/class names? > > I'm open to suggestions, but I've not been able to think of anything better. > `encodeISOOrASCII` doesn't seem helpful and since ASCII is a subset of the > ISO-8859-1

Re: RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86 [v3]

2021-09-27 Thread Claes Redestad
On Mon, 27 Sep 2021 09:34:21 GMT, Volker Simonis wrote: >> Claes Redestad has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add Matcher predicate to avoid changing shared code as non-x86 platforms >> implements support for the

Re: RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86 [v2]

2021-09-27 Thread Claes Redestad
On Mon, 27 Sep 2021 06:36:50 GMT, Tobias Hartmann wrote: > Should we remove the "iso" part from the method/class names? I'm open to suggestions, but I've not been able to think of anything better. `encodeISOOrASCII` doesn't seem helpful and since ASCII is a subset of the ISO-8859-1 encoding

Re: RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86 [v2]

2021-09-27 Thread Claes Redestad
> This patch extends the `ISO_8859_1.implEncodeISOArray` intrinsic on x86 to > work also for ASCII encoding, which makes for example the `UTF_8$Encoder` > perform on par with (or outperform) similarly getting charset encoded bytes > from a String. The former took a small performance hit in JDK

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

2021-09-27 Thread Volker Simonis
On Tue, 21 Sep 2021 21:58:48 GMT, Claes Redestad wrote: > This patch extends the `ISO_8859_1.implEncodeISOArray` intrinsic on x86 to > work also for ASCII encoding, which makes for example the `UTF_8$Encoder` > perform on par with (or outperform) similarly getting charset encoded bytes > from

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

2021-09-27 Thread Tobias Hartmann
On Tue, 21 Sep 2021 21:58:48 GMT, Claes Redestad wrote: > This patch extends the `ISO_8859_1.implEncodeISOArray` intrinsic on x86 to > work also for ASCII encoding, which makes for example the `UTF_8$Encoder` > perform on par with (or outperform) similarly getting charset encoded bytes > from

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

2021-09-24 Thread Sandhya Viswanathan
On Tue, 21 Sep 2021 21:58:48 GMT, Claes Redestad wrote: > This patch extends the `ISO_8859_1.implEncodeISOArray` intrinsic on x86 to > work also for ASCII encoding, which makes for example the `UTF_8$Encoder` > perform on par with (or outperform) similarly getting charset encoded bytes > from

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

2021-09-24 Thread Naoto Sato
On Tue, 21 Sep 2021 21:58:48 GMT, Claes Redestad wrote: > This patch extends the `ISO_8859_1.implEncodeISOArray` intrinsic on x86 to > work also for ASCII encoding, which makes for example the `UTF_8$Encoder` > perform on par with (or outperform) similarly getting charset encoded bytes > from

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

2021-09-24 Thread Claes Redestad
On Thu, 23 Sep 2021 00:03:55 GMT, Claes Redestad 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

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

2021-09-24 Thread Claes Redestad
This patch extends the `ISO_8859_1.implEncodeISOArray` intrinsic on x86 to work also for ASCII encoding, which makes for example the `UTF_8$Encoder` perform on par with (or outperform) similarly getting charset encoded bytes from a String. The former took a small performance hit in JDK 9, and

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

2021-09-24 Thread Claes Redestad
On Tue, 21 Sep 2021 21:58:48 GMT, Claes Redestad wrote: > This patch extends the `ISO_8859_1.implEncodeISOArray` intrinsic on x86 to > work also for ASCII encoding, which makes for example the `UTF_8$Encoder` > perform on par with (or outperform) similarly getting charset encoded bytes > from