RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v42]
Vladimir Ivanov
vlivanov at openjdk.org
Wed Oct 11 23:57:47 UTC 2023
On Wed, 11 Oct 2023 23:38:05 GMT, Sandhya Viswanathan <sviswanathan at 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
More information about the hotspot-compiler-dev
mailing list