[foreign-memaccess+abi] RFR: Performance improvement to unchecked segment ofNativeRestricted [v4]
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Fri Jan 22 22:18:51 UTC 2021
On Fri, 22 Jan 2021 20:55:41 GMT, Radoslaw Smogura <github.com+7535718+rsmogura 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,
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!
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/437
More information about the panama-dev
mailing list