RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v14]
Srinivas Vamsi Parasa
duke at openjdk.org
Tue Aug 15 20:08:18 UTC 2023
On Tue, 15 Aug 2023 19:23:24 GMT, iaroslavski <duke at openjdk.org> wrote:
>>> @vamsi-parasa We need to preserve NaNs. The base (https://github.com/intel/x86-simd-sort) algorithm used doesn't preserve NaNs.
>>
>> Thanks for catching this Sandhya! This is fixed now in the most recent commit. A preprocessing step is added to move the NaNs to the top of the array.
>
> Hello @vamsi-parasa !
>
> Do you process negative zeros properly? From one hand -0.0f equals to 0.0f, but negative zeros must be placed before 0.0f.
> See javadoc for Arrays.sort(float[] a). The same situation with -0.0d (double type).
@iaroslavski
Hello Vladimir,
The algorithm is handling zeros correctly. It places -0.0 before +0.0.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14227#issuecomment-1679532729
More information about the hotspot-compiler-dev
mailing list