Re: RFR: 8334342: Add MergeStore JMH benchmarks [v4]

2024-06-17 Thread Emanuel Peter
On Mon, 17 Jun 2024 08:07:40 GMT, Shaojin Wen  wrote:

>> test/micro/org/openjdk/bench/java/lang/MergeStoreBench.java line 656:
>> 
>>> 654: array[offset + 2] = (byte) (value >>  8);
>>> 655: array[offset + 3] = (byte) (value  );
>>> 656: }
>> 
>> You say that here `MergeStore` does not work. That is because the indices 
>> are increasing, but the shifts decreasing. So that does not work on 
>> little-endian machines (most architectures), but I would expect it to work 
>> on big-endian machines with https://github.com/openjdk/jdk/pull/19218.
>
> Big endian is often used in network data transmission scenarios, and it is 
> common to process big endian data on a little endian machine. In this case, 
> can it be optimized to Integer.reverseBytes & putIntLittleEndian on a 
> LittleEndian machine? `setIntB -> setIntRL`

I had already suggested that here:
https://github.com/openjdk/jdk/pull/19218#pullrequestreview-2076196539
Feel free to file an RFE. Maybe someone wants to work on it. I think it would 
not be that hard to make it work given all the code that is already there now. 
And it would be helpful in for both big/little endian to be able to do both 
orders.

-

PR Review Comment: https://git.openjdk.org/jdk/pull/19734#discussion_r1643088147


Re: RFR: 8334342: Add MergeStore JMH benchmarks [v4]

2024-06-17 Thread Shaojin Wen
> [8318446](https://github.com/openjdk/jdk/pull/16245)  brings MergeStore. We 
> need a JMH Benchmark to evaluate the performance of various batch operations 
> and the effect of MergeStore.

Shaojin Wen has updated the pull request incrementally with one additional 
commit since the last revision:

  bug fix for `putChars4C`

-

Changes:
  - all: https://git.openjdk.org/jdk/pull/19734/files
  - new: https://git.openjdk.org/jdk/pull/19734/files/1ed9b22e..1140bd81

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk=19734=03
 - incr: https://webrevs.openjdk.org/?repo=jdk=19734=02-03

  Stats: 8 lines in 1 file changed: 0 ins; 0 del; 8 mod
  Patch: https://git.openjdk.org/jdk/pull/19734.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19734/head:pull/19734

PR: https://git.openjdk.org/jdk/pull/19734