RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v13]
Andrew Haley
aph at openjdk.org
Thu Aug 3 22:08:32 UTC 2023
On Tue, 1 Aug 2023 17:38:06 GMT, Srinivas Vamsi Parasa <duke at openjdk.org> wrote:
>> What is the reasoning behind this new public API? It doesn't follow the usual Java convention, which is to have overloads for each type. And it doesn't seem to provide anything not already provided by `Arrays.sort()`.
>
> Hi Andrew, the reason for the public API is to make AVX512 sort available to other data structures like MemorySegment (including the ones backed by native heap). The API of the arraySort() AVX512 intrinsic is similar to the public API of ArraysSupport.vectorizedMismatch() which is used by MemorySegment.mismatch().
There's no need to make this method public, and it should not be. There is no need to have it in the Java API. `ArraysSupport.vectorizedMismatch()` is in an internal JDK class, not part of the Java API.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14227#discussion_r1283764321
More information about the hotspot-compiler-dev
mailing list