On Fri, 18 Oct 2024 21:56:53 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Fri, 18 Oct 2024 21:56:53 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Fri, 18 Oct 2024 21:56:53 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Fri, 18 Oct 2024 21:56:53 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Fri, 18 Oct 2024 21:56:53 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Fri, 18 Oct 2024 21:56:53 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Fri, 18 Oct 2024 21:56:53 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Fri, 18 Oct 2024 21:56:53 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Fri, 18 Oct 2024 21:56:53 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Mon, 21 Oct 2024 07:58:42 GMT, Emanuel Peter wrote:
>> Shaojin Wen 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 26 additional
>> commits s
On Mon, 21 Oct 2024 01:29:16 GMT, Shaojin Wen wrote:
>> Shaojin Wen 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 26 additional
>> commits sin
On Fri, 18 Oct 2024 21:56:53 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Fri, 18 Oct 2024 21:56:53 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Fri, 18 Oct 2024 21:56:53 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Fri, 18 Oct 2024 21:56:53 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Fri, 18 Oct 2024 23:29:58 GMT, Shaojin Wen wrote:
> After PR 19970, the performance has been significantly improved. Below are
> the performance numbers for AMD CPU (x64)
It'd be interesting to check performance on this micro with #19970 alone
-
PR Comment: https://git.openjdk.
On Fri, 18 Oct 2024 21:56:53 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
> primitive arrays by combining values into larger stores.
>
> This PR rewrites the code of appendNull and append(boolean) methods so that
> these two methods can be optimized by C2.
Shaojin Wen has updated the pul
On Mon, 23 Sep 2024 23:23:12 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Mon, 23 Sep 2024 23:23:12 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
> primitive arrays by combining values into larger stores.
>
> This PR rewrites the code of appendNull and append(boolean) methods so that
> these two methods can be optimized by C2.
Shaojin Wen has updated the pul
On Sun, 22 Sep 2024 02:03:02 GMT, Chen Liang wrote:
> We should declare `count` before `ensureCapacitiyInternal`. Same for append
> boolean.
Declaring count before ensureCapacityInternal will cause performance regression
under x64. It took a lot of time to find this, but the underlying reason
On Sun, 22 Sep 2024 02:01:36 GMT, Chen Liang wrote:
>> Shaojin Wen 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 23 additional
>> commits sinc
> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
> primitive arrays by combining values into larger stores.
>
> This PR rewrites the code of appendNull and append(boolean) methods so that
> these two methods can be optimized by C2.
Shaojin Wen has updated the pul
On Sat, 24 Aug 2024 06:27:26 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
> primitive arrays by combining values into larger stores.
>
> This PR rewrites the code of appendNull and append(boolean) methods so that
> these two methods can be optimized by C2.
Shaojin Wen has updated the pul
On Thu, 25 Jul 2024 01:14:32 GMT, Shaojin Wen wrote:
>> @cl4es I would wait, to be honest. I'm currently quite busy, but I hope I
>> can do something here in the next 2-3 weeks.
>
> @eme64 Unsafe.putByte MergeStore of master branch doesn't work
>
>
> import sun.misc.Unsafe;
>
> public class
On Wed, 26 Jun 2024 14:39:57 GMT, Emanuel Peter wrote:
>>> I filed:
>>>
>>> [JDK-8335113](https://bugs.openjdk.org/browse/JDK-8335113): C2 MergeStores:
>>> allow merging of putChar and other larger stores on smaller array elements
>>
>> Great! Should we hold off on this optimization and see if
> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
> primitive arrays by combining values into larger stores.
>
> This PR rewrites the code of appendNull and append(boolean) methods so that
> these two methods can be optimized by C2.
Shaojin Wen has updated the pul
On Tue, 23 Jul 2024 13:48:57 GMT, Chen Liang wrote:
>> explicit array stores has the overhead of boundary checking. If putCharsAt
>> of StringLatin1 is not implemented based on Unsafe, the performance will be
>> worse than StringUTF16.
>>
>> Of course, this is a common problem. StringUTF16.pu
On Tue, 23 Jul 2024 13:42:20 GMT, Shaojin Wen wrote:
>> src/java.base/share/classes/java/lang/StringLatin1.java line 832:
>>
>>> 830: static void putCharsAt(byte[] val, int index, int c1, int c2, int
>>> c3, int c4) {
>>> 831: assert index >= 0 && index + 3 < length(val) : "Trusted
On Tue, 23 Jul 2024 13:25:16 GMT, Chen Liang wrote:
>> Shaojin Wen has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> replace unsafe with putChar
>
> src/java.base/share/classes/java/lang/StringLatin1.java line 832:
>
>> 830: static vo
On Tue, 23 Jul 2024 12:57:52 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
> primitive arrays by combining values into larger stores.
>
> This PR rewrites the code of appendNull and append(boolean) methods so that
> these two methods can be optimized by C2.
Shaojin Wen has updated the pul
> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
> primitive arrays by combining values into larger stores.
>
> This PR rewrites the code of appendNull and append(boolean) methods so that
> these two methods can be optimized by C2.
Shaojin Wen has updated the pul
On Sun, 23 Jun 2024 08:47:25 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Thu, 20 Jun 2024 14:32:25 GMT, Shaojin Wen wrote:
>> @cl4es @wenshao I think we should probably work on `putChar`, or at least
>> figure out what blocks `MergeStore` for `putChar`. Can someone produce a
>> simple stand-alone `.java` file that uses `putChar`, so that I can
>> investigate wh
On Wed, 26 Jun 2024 14:38:04 GMT, Claes Redestad wrote:
>> @wenshao @cl4es I think this use-case is quite a valid one, and deserves an
>> extension. I filed:
>>
>> [JDK-8335113](https://bugs.openjdk.org/browse/JDK-8335113): C2 MergeStores:
>> allow merging of putChar and other larger stores on
On Tue, 25 Jun 2024 17:19:28 GMT, Emanuel Peter wrote:
> I filed:
>
> [JDK-8335113](https://bugs.openjdk.org/browse/JDK-8335113): C2 MergeStores:
> allow merging of putChar and other larger stores on smaller array elements
Great! Should we hold off on this optimization and see if we can avoid
On Thu, 20 Jun 2024 14:32:25 GMT, Shaojin Wen wrote:
>> @cl4es @wenshao I think we should probably work on `putChar`, or at least
>> figure out what blocks `MergeStore` for `putChar`. Can someone produce a
>> simple stand-alone `.java` file that uses `putChar`, so that I can
>> investigate wh
On Sun, 23 Jun 2024 08:47:25 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Thu, 20 Jun 2024 09:54:37 GMT, Claes Redestad wrote:
>> Shaojin Wen has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Utf16 case remove `append first utf16 char`
>
> src/java.base/share/classes/java/lang/StringLatin1.java line 832:
>
>
> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
> primitive arrays by combining values into larger stores.
>
> This PR rewrites the code of appendNull and append(boolean) methods so that
> these two methods can be optimized by C2.
Shaojin Wen has updated the pul
On Thu, 20 Jun 2024 10:54:49 GMT, Emanuel Peter wrote:
>> I'm not opposed to accepting this patch as-is, but I think we should do so
>> with an eye towards reverting if we figure out a way to improve the
>> `putChar` intrinsic so that it doesn't block merge store optimization. What
>> do you t
On Thu, 20 Jun 2024 10:09:46 GMT, Claes Redestad wrote:
>> @wenshao I'm glad we figured it out a bit, and I hope you learned a thing or
>> two :)
>>
>>> It would be even better if Unsafe.putChar could be used for MergeStore in
>>> the future.
>>
>> The `_putCharStringU` intrinsic uses
>> `Li
On Thu, 13 Jun 2024 07:36:34 GMT, Emanuel Peter wrote:
>> Thanks to @eme64 's patience and help, I found a way to use MergeStore
>> without doing boundary checking.
>>
>> It would be even better if Unsafe.putChar could be used for MergeStore in
>> the future.
>>
>> ## 1. JavaCode
>>
>> class
On Mon, 17 Jun 2024 05:53:45 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Thu, 13 Jun 2024 09:51:21 GMT, Claes Redestad wrote:
>> Shaojin Wen has updated the pull request incrementally with two additional
>> commits since the last revision:
>>
>> - rename benchmark
>> - code format & use long address
>
> Replacing `StringUTF16.putChar` with an `Unsafe.putByte` c
> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
> primitive arrays by combining values into larger stores.
>
> This PR rewrites the code of appendNull and append(boolean) methods so that
> these two methods can be optimized by C2.
Shaojin Wen has updated the pul
> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
> primitive arrays by combining values into larger stores.
>
> This PR rewrites the code of appendNull and append(boolean) methods so that
> these two methods can be optimized by C2.
Shaojin Wen has updated the pul
> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
> primitive arrays by combining values into larger stores.
>
> This PR rewrites the code of appendNull and append(boolean) methods so that
> these two methods can be optimized by C2.
Shaojin Wen has updated the pul
On Fri, 14 Jun 2024 01:17:29 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
> primitive arrays by combining values into larger stores.
>
> This PR rewrites the code of appendNull and append(boolean) methods so that
> these two methods can be optimized by C2.
Shaojin Wen has updated the pul
On Thu, 13 Jun 2024 02:06:42 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Thu, 13 Jun 2024 02:06:42 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Wed, 12 Jun 2024 15:58:59 GMT, Shaojin Wen wrote:
>>> @eme64 It seems like MergeStore didn't happen, is there something I did
>>> wrong?
>>
>> Yes ;)
>>
>> @wenshao The issue is that the pattern matching is quite **limited**.
>> `putCharsAt(byte[] value, int i, char c1, char c2, char c3, ch
> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
> primitive arrays by combining values into larger stores.
>
> This PR rewrites the code of appendNull and append(boolean) methods so that
> these two methods can be optimized by C2.
Shaojin Wen has updated the pul
> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
> primitive arrays by combining values into larger stores.
>
> This PR rewrites the code of appendNull and append(boolean) methods so that
> these two methods can be optimized by C2.
Shaojin Wen has updated the pul
> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
> primitive arrays by combining values into larger stores.
>
> This PR rewrites the code of appendNull and append(boolean) methods so that
> these two methods can be optimized by C2.
Shaojin Wen has updated the pul
On Wed, 12 Jun 2024 14:58:39 GMT, Emanuel Peter wrote:
>> @wenshao If you look at the tests in
>> https://github.com/openjdk/jdk/pull/16245, you can see examples like this:
>> https://github.com/eme64/jdk/blob/93bf2ddc9b7f584724034aec6a4f8b9fe1b2dfda/test/hotspot/jtreg/compiler/c2/TestMergeStore
> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
> primitive arrays by combining values into larger stores.
>
> This PR rewrites the code of appendNull and append(boolean) methods so that
> these two methods can be optimized by C2.
Shaojin Wen has updated the pul
On Wed, 12 Jun 2024 14:24:00 GMT, Emanuel Peter wrote:
>> _putCharStringU will perform MergeStore but with bounds checking. Can the C2
>> optimizer perform MergeStore without bounds checking in this case?
>>
>> StringUTF16.putChar does not have a bounds check, so there should be no
>> bounds c
On Wed, 12 Jun 2024 14:24:00 GMT, Emanuel Peter wrote:
>> _putCharStringU will perform MergeStore but with bounds checking. Can the C2
>> optimizer perform MergeStore without bounds checking in this case?
>>
>> StringUTF16.putChar does not have a bounds check, so there should be no
>> bounds c
On Wed, 12 Jun 2024 14:16:50 GMT, Shaojin Wen wrote:
>> Shaojin Wen has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> revert
>
> _putCharStringU will perform MergeStore but with bounds checking. Can the C2
> optimizer perform MergeStore w
On Tue, 11 Jun 2024 11:35:28 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Wed, 12 Jun 2024 13:38:21 GMT, Shaojin Wen wrote:
> In the AbstractStringBuilder#appendNull method, is it possible to not check
> the bounds based on the information from ensureCapacityInternal?
Perhaps you'd need something like a `Preconditions.checkIndex` in or before the
4-char `StringUT
On Tue, 11 Jun 2024 11:35:28 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Tue, 11 Jun 2024 11:35:28 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Tue, 11 Jun 2024 11:35:28 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Tue, 11 Jun 2024 11:35:28 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Tue, 11 Jun 2024 11:35:28 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Tue, 11 Jun 2024 11:35:28 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Wed, 12 Jun 2024 12:38:58 GMT, Shaojin Wen wrote:
>> Shaojin Wen has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> revert
>
> -XX:+TraceMergeStores -XX:+UnlockDiagnosticVMOptions
> -XX:DisableIntrinsic=_putCharStringU
>
>
>
> [Trace
On Tue, 11 Jun 2024 11:35:28 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Tue, 11 Jun 2024 11:35:28 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Tue, 11 Jun 2024 11:35:28 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Wed, 12 Jun 2024 12:18:32 GMT, Shaojin Wen wrote:
> I have another question. The StringUTF16.putChar method inside JDK is an
> intrinsic method, which seems to cause the putCharsAt method to be unable to
> merge to long stores.
Can you show me an example, with the `-XX:CompileCommand=printc
On Wed, 12 Jun 2024 11:59:47 GMT, Emanuel Peter wrote:
>> Shaojin Wen has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> revert
>
> Going back to:
>
> ./java -XX:+TraceMergeStores -Xbatch -XX:CompileCommand=printcompilation,*::*
> -XX:+Pr
On Tue, 11 Jun 2024 11:35:28 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Tue, 11 Jun 2024 11:35:28 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Tue, 11 Jun 2024 11:35:28 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Tue, 11 Jun 2024 11:35:28 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Tue, 11 Jun 2024 11:35:28 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Tue, 11 Jun 2024 11:35:28 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Tue, 11 Jun 2024 11:35:28 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Tue, 11 Jun 2024 11:35:28 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Tue, 11 Jun 2024 16:08:18 GMT, Emanuel Peter wrote:
>> @eme64 TraceMergeStores are here, but I can't understand these assembly
>> codes
>>
>> # JavaCode
>>
>> class AbstractStringBuilder {
>> private AbstractStringBuilder appendNull() {
>> int count = this.count;
>> en
On Tue, 11 Jun 2024 15:55:18 GMT, Shaojin Wen wrote:
>> @wenshao have you published info about `TraceMergeStores` somewhere? It is
>> very well possible that the optimization does not apply in your code. Then
>> you would need to dig into the VM code and see why.
>
> @eme64 TraceMergeStores are
On Tue, 11 Jun 2024 12:11:21 GMT, Shaojin Wen wrote:
>> Shaojin Wen has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> revert
>
> ([f96cde4e](https://git.openjdk.org/jdk/pull/19626/files/f96cde4e79e12e2ea46e6061f918a69f11d59985))
>
> ([0c
On Tue, 11 Jun 2024 11:35:28 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
> primitive arrays by combining values into larger stores.
>
> This PR rewrites the code of appendNull and append(boolean) methods so that
> these two methods can be optimized by C2.
Shaojin Wen has updated the pul
On Tue, 11 Jun 2024 05:42:27 GMT, Shaojin Wen wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
>> primitive arrays by combining values into larger stores.
>>
>> This PR rewrites the code of appendNull and append(boolean) methods so that
>> these two meth
On Tue, 11 Jun 2024 09:39:29 GMT, Shaojin Wen wrote:
>> @wenshao This is just an assembly dump. You need to have some profiling data
>> that tells you where the time is spent. I'm not going to do the analysis
>> work for you, I'm sorry. I gave you some pointers as how to do that. If you
>> hav
On Tue, 11 Jun 2024 09:32:14 GMT, Emanuel Peter wrote:
>> @eme64 The assembly information is below, can you take a look and see if it
>> can help you diagnose the problem?
>>
>> * JavaCode
>>
>> class AbstractStringBuilder {
>> private AbstractStringBuilder appendNull() {
>> int c
On Tue, 11 Jun 2024 09:17:00 GMT, Shaojin Wen wrote:
>> @wenshao
>>> @eme64 It seems that when the following code uses StringUTF16.putChar, C2's
>>> optimization is not as good as the manual merging and storage effect.
>>
>> As I asked above, you will need to provide some evidence / generated
On Tue, 11 Jun 2024 06:27:13 GMT, Emanuel Peter wrote:
>> @eme64 It seems that when the following code uses StringUTF16.putChar, C2's
>> optimization is not as good as the manual merging and storage effect.
>>
>> class AbstractStringBuilder {
>> private AbstractStringBuilder appendNull() {
On Mon, 10 Jun 2024 23:10:05 GMT, Shaojin Wen wrote:
>> @wenshao
>>> I think the performance of the Unsafe branch may be the best data for the
>>> C2 optimizer. @eme64 can help me see if C2 can do it?
>>
>> Have you tried to see if the optimization actually was done/taken? You can
>> use the
> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
> primitive arrays by combining values into larger stores.
>
> This PR rewrites the code of appendNull and append(boolean) methods so that
> these two methods can be optimized by C2.
Shaojin Wen has updated the pul
> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
> primitive arrays by combining values into larger stores.
>
> This PR rewrites the code of appendNull and append(boolean) methods so that
> these two methods can be optimized by C2.
Shaojin Wen has updated the pul
On Mon, 10 Jun 2024 12:12:58 GMT, Shaojin Wen wrote:
> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into
> primitive arrays by combining values into larger stores.
>
> This PR rewrites the code of appendNull and append(boolean) methods so that
> these two methods c
1 - 100 of 107 matches
Mail list logo