[vectorIntrinsics] RFR: Optimize mem barriers for ByteBuffer cases [v8]
Radoslaw Smogura
github.com+7535718+rsmogura at openjdk.java.net
Wed Aug 4 16:45:47 UTC 2021
On Wed, 4 Aug 2021 15:12:35 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
>> Radoslaw Smogura has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Minor stylistic fixes.
>
> src/java.base/share/classes/jdk/internal/misc/X-ScopedMemoryAccess.java.template line 421:
>
>> 419: bb, offset, s,
>> 420: defaultImpl);
>> 421: }
>
> Can we try collapsing that to:
> Suggestion:
>
> return VectorSupport.load(vmClass, e, length,
> base, BufferAccess.bufferAddress(bb, offset),
> bb, offset, s,
> defaultImpl);
>
> ? That appeared to be ok when i ran the benchmark for the non-polluted cases.
When I reverted changes I took base as `Object`, from `BufferAccess`, and did not work. Looks like cast to byte[] implies some kind of null checks, and we can use this.
-------------
PR: https://git.openjdk.java.net/panama-vector/pull/104
More information about the panama-dev
mailing list