On Wed, 11 Oct 2023 23:38:05 GMT, Sandhya Viswanathan 
<sviswanat...@openjdk.org> wrote:

>> Also, for on-heap case the fallback implementation is equivalent to 
>> intrinsified case only when offset points at the 0th element of the array.
>
> @iwanowww Yes, you are late to the party :). The fallback implementation 
> could be similar to the vectorizedMismatch regarding base/offset for non heap 
> case. Please see 
> java.base/share/classes/jdk/internal/foreign/AbstractMemorySegmentImpl.java.
> Yes, the fallback implementation for non intrinsic case is kept to be 
> equivalent to what was before the SIMD sort PR. This is done to not affect 
> the fallback performance on other platforms.

The problem with fallback implementation as it is now is that it doesn't take 
into account the offset. It's completely broken for off-heap case and works for 
on-heap case only because the implementation always passes primitive array base 
offset.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14227#discussion_r1355894722

Reply via email to