RFR: 8286401: Address possibly lossy conversions in Microbenchmarks [v2]
Claes Redestad
redestad at openjdk.java.net
Wed May 11 15:50:41 UTC 2022
On Wed, 11 May 2022 15:21:51 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Claes Redestad has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Copyrights, consistently use the exact accumulator type
>
> test/micro/org/openjdk/bench/vm/compiler/PointerBenchmarkFlat.java line 151:
>
>> 149: int sum = 0;
>> 150: for (int i = 0 ; i < ELEM_SIZE ; i++) {
>> 151: sum += (int)ptr_ptr.get(i).address().toRawLongValue();
>
> Here and later: `toRawLongValue` returns `long`, right? So why don't we change the accumulator and return value to `long`, like we do in other tests?
Yeah, let's be consistent. I have verified that this does not affect the raw scores of these benchmarks.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8654
More information about the security-dev
mailing list