RFR: 8343629: More MergeStore benchmark [v5]

Shaojin Wen swen at openjdk.org
Mon Dec 9 16:29:44 UTC 2024


On Thu, 5 Dec 2024 06:59:07 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   seperate MergeStoreBench and MergeLoadBench
>
> test/micro/org/openjdk/bench/vm/compiler/MergeStoreBench.java line 103:
> 
>> 101:     public void setIntBU(Blackhole BH) {
>> 102:         int off = 0;
>> 103:         for (int i = ints.length - 1; i >= 0; i--) {
> 
> Why are you going reverse here, and also other places? Does that affect the performance at all?

My original intention was to have reads and writes in different orders to avoid being optimized into a batch copy.

> test/micro/org/openjdk/bench/vm/compiler/MergeStoreBench.java line 135:
> 
>> 133:         for (int i = ints.length - 1; i >= 0; i--) {
>> 134:             setIntLU(bytes4, off, ints[i]);
>> 135:             off += 4;
> 
> I'm also wondering why you changed it from multiplication of `i * 4` to `offset += 4`. Did that have an impact?

I guess +=4 has less overhead, so the performance test is more accurate.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21659#discussion_r1876287984
PR Review Comment: https://git.openjdk.org/jdk/pull/21659#discussion_r1876290958


More information about the hotspot-compiler-dev mailing list