On Wed, 12 Jun 2024 12:38:58 GMT, Shaojin Wen <d...@openjdk.org> 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
> 
> 
> 
> [TraceMergeStores]: Replace
>   644  StoreB  === 628 499 642 573  [[ 669 655 ]]  @byte[int:>=0] 
> (java/lang/Cloneable,java/io/Serializable):exact+any *, idx=10;  Memory: 
> @byte[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any 
> *, idx=10; !jvms: StringUTF16::putChar @ bci:43 (line 71) 
> StringUTF16::putCharsAt @ bci:3 (line 1552) AbstractStringBuilder::appendNull 
> @ bci:63 (line 647) AbstractStringBuilder::append @ bci:5 (line 587)
>   669  StoreB  === 654 644 667 35  [[ 720 ]]  @byte[int:>=0] 
> (java/lang/Cloneable,java/io/Serializable):exact+any *, idx=10;  Memory: 
> @byte[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any 
> *, idx=10; !jvms: StringUTF16::putChar @ bci:52 (line 72) 
> StringUTF16::putCharsAt @ bci:3 (line 1552) AbstractStringBuilder::appendNull 
> @ bci:63 (line 647) AbstractStringBuilder::append @ bci:5 (line 587)
>   720  StoreB  === 654 669 718 574  [[ 744 ]]  @byte[int:>=0] 
> (java/lang/Cloneable,java/io/Serializable):exact+any *, idx=10;  Memory: 
> @byte[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any 
> *, idx=10; !jvms: StringUTF16::putChar @ bci:43 (line 71) 
> StringUTF16::putCharsAt @ bci:11 (line 1553) 
> AbstractStringBuilder::appendNull @ bci:63 (line 647) 
> AbstractStringBuilder::append @ bci:5 (line 587)
>   744  StoreB  === 654 720 742 35  [[ 796 ]]  @byte[int:>=0] 
> (java/lang/Cloneable,java/io/Serializable):exact+any *, idx=10;  Memory: 
> @byte[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any 
> *, idx=10; !jvms: StringUTF16::putChar @ bci:52 (line 72) 
> StringUTF16::putCharsAt @ bci:11 (line 1553) 
> AbstractStringBuilder::appendNull @ bci:63 (line 647) 
> AbstractStringBuilder::append @ bci:5 (line 587)
>   796  StoreB  === 654 744 794 575  [[ 820 ]]  @byte[int:>=0] 
> (java/lang/Cloneable,java/io/Serializable):exact+any *, idx=10;  Memory: 
> @byte[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any 
> *, idx=10; !jvms: StringUTF16::putChar @ bci:43 (line 71) 
> StringUTF16::putCharsAt @ bci:20 (line 1554) 
> AbstractStringBuilder::appendNull @ bci:63 (line 647) 
> AbstractStringBuilder::append @ bci:5 (line 587)
>   820  StoreB  === 654 796 818 35  [[ 872 ]]  @byte[int:>=0] 
> (java/lang/Cloneable,java/io/Serializable):exact+any *, idx=10;  Memory: 
> @byte[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any 
> *, idx=10; !jvms: StringUTF16::putChar @ bci:52 (line 72) 
> StringUTF16::putCharsAt @ ...

@wenshao @cl4es nice, so it is a problem that `putChar` is not inlined in these 
cases, but intfinsified. Now it would be interestig to see if we can get rid of 
the `putChar` intrinsic. That would have to happen in a separate RFE probably, 
and would require sufficient benchmarking.

But first: I would say @wenshao should run the benchmarks from above again with 
disabled intrinsic. We could expect to get a performance boost from that - but 
we want to prove it with the benchmark.

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

PR Comment: https://git.openjdk.org/jdk/pull/19626#issuecomment-2162937241

Reply via email to