[foreign-memaccess+abi] RFR: Performance improvement to unchecked segment ofNativeRestricted [v4]
Radoslaw Smogura
github.com+7535718+rsmogura at openjdk.java.net
Tue Jan 26 17:53:51 UTC 2021
On Fri, 22 Jan 2021 22:15:27 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Hi all,
>>
>> I realized that my benchmarks contains small issue. I think @mcimadamore mentioned it, but I did not understood.
>>
>> The loops are counted using long instead of int. With int I've seen the loop get unrolled and the aligned to 1 loop is as fast as other tests.
>>
>> I'm not sure if at this stage I c an add modified benchmarks or should I opens new PR?
>
>> Hi all,
>>
>> I realized that my benchmarks contains small issue. I think @mcimadamore mentioned it, but I did not understood.
>>
>> The loops are counted using long instead of int. With int I've seen the loop get unrolled and the aligned to 1 loop is as fast as other tests.
>>
>> I'm not sure if at this stage I c an add modified benchmarks or should I opens new PR?
>
> Hi,
> this PR is still open, since I forgot to integrate it (sorry). But this means that we can decide what to do. I see the issue with the benchmark - well spotted. At this point, to be honest, I'm unsure about the value of the proposed patch. It helps a bit for long loops, yes, but in the idiomatic use (e.g. with int) performances are the same. Given that better VM support for long loops is on the way, I'm not sure we should add more workarounds for longs (as it's proving already difficult to keep an inventory of all the hacks we have in the implementation in order to eliminate this hotspot issue).
>
> Would you be ok with just closing the PR, or, maybe just add the (revised) benchmark for the everything segment (which we don't currently have) ?
>
> Thanks!
Hi Maurizio,
I hope this message finds you well.
Maybe let me add a benchmark first. In fact I never targeted this for loops, but for use cases where the access will be random, so when the chance to put checks outside loop are minimal.
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/437
More information about the panama-dev
mailing list