RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, long, float and double arrays)
David Holmes
dholmes at openjdk.org
Thu Nov 16 07:07:31 UTC 2023
On Wed, 15 Nov 2023 22:05:47 GMT, Srinivas Vamsi Parasa <duke at openjdk.org> wrote:
>> make/modules/java.base/Lib.gmk line 245:
>>
>>> 243: TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
>>> 244: OPTIMIZATION := HIGH, \
>>> 245: CFLAGS := $(CFLAGS_JDKLIB) -std=c++17, \
>>
>> This makes me uneasy. We do not in general use C++17 in the JDK.
>>
>> Is this flag needed for the code to compile? If so, would it be difficult to rewrite it not to require C++17 constructs?
>>
>> Or was it added since you noticed performance increases, not related to the new code, by forcing the compiler to use a higher language revision?
>>
>> We are supporting gcc versions from 6. From what I can tell, C++17 was fully introduced in gcc 11. Increasing the lowest supported gcc to 11 would require quite a jump, just for this library.
>>
>> In the worst case, you would need to make the existence of this library dependent on gcc version. (It is my understanding that the library is optional, and just produces a performance benefits if it exists).
>
> Hi Magnus, the new x86-simd-sort 4.0 needs C++17 to compile. Will look into the changes needed for this library to compile without the C++17 standard and get back to you.
>
> Thanks,
> Vamsi
Seems a bit odd to me too as the existing simd code seems to C code residing in .cpp files for some reason.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16534#discussion_r1395233522
More information about the build-dev
mailing list