Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v12]

2023-12-12 Thread Srinivas Vamsi Parasa
On Tue, 12 Dec 2023 15:42:09 GMT, Magnus Ihse Bursie wrote: >> Thank you Magnus! > > @vamsi-parasa You said: >> Made sure that OpenJDK builds without errors using both GCC 7.5 and GCC 6.4. > > but now we have https://bugs.openjdk.org/browse/JDK-8321688. Did you > introduce any changes after you

Integrated: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays)

2023-12-08 Thread Srinivas Vamsi Parasa
On Tue, 7 Nov 2023 00:12:41 GMT, Srinivas Vamsi Parasa wrote: > The goal is to develop faster sort routines for x86_64 CPUs by taking > advantage of AVX2 instructions. This enhancement provides an order of > magnitude speedup for Arrays.sort() using int, long, float and double arrays.

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v12]

2023-12-08 Thread Srinivas Vamsi Parasa
On Fri, 8 Dec 2023 22:37:26 GMT, Vladimir Kozlov wrote: > I pushed closed changes. Thanks Vladimir! - PR Comment: https://git.openjdk.org/jdk/pull/16534#issuecomment-1847939767

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v12]

2023-12-07 Thread Srinivas Vamsi Parasa
On Fri, 8 Dec 2023 00:31:26 GMT, Vladimir Kozlov wrote: > Testing have only one failure in closed tests and I need to fix it before > this can be pushed. Thanks Vladimir for the update. Is the test failure because of this PR? - PR Comment: https://git.openjdk.org/jdk/pull/16534#is

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v12]

2023-12-06 Thread Srinivas Vamsi Parasa
On Wed, 6 Dec 2023 23:09:01 GMT, Srinivas Vamsi Parasa wrote: >>> LGTM, thanks! >> >> Thanks Jatin! > >> @vamsi-parasa, sorry, I was wrong. I missed that you need to check type >> `bt`. Latest change is more complicated than it was before. Please revert it

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v12]

2023-12-06 Thread Srinivas Vamsi Parasa
On Wed, 6 Dec 2023 17:44:24 GMT, Srinivas Vamsi Parasa wrote: >> LGTM, thanks! > >> LGTM, thanks! > > Thanks Jatin! > @vamsi-parasa, sorry, I was wrong. I missed that you need to check type `bt`. > Latest change is more complicated than it was before. Please r

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v12]

2023-12-06 Thread Srinivas Vamsi Parasa
57.175 | 5.7 > ArraysSort.floatSort | 10 | 4299.519 | 862.63 | 5.0 > ArraysSort.floatSort | 100 | 50889.4 | 10972.19 | 4.6 > > > > > > xmlns:o="urn:schemas-microsoft-com:office:office" > xmlns:x="urn:schemas-microsoft-com:office:excel" > x

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v11]

2023-12-06 Thread Srinivas Vamsi Parasa
57.175 | 5.7 > ArraysSort.floatSort | 10 | 4299.519 | 862.63 | 5.0 > ArraysSort.floatSort | 100 | 50889.4 | 10972.19 | 4.6 > > > > > > xmlns:o="urn:schemas-microsoft-com:office:office" > xmlns:x="urn:schemas-microsoft-com:office

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v10]

2023-12-06 Thread Srinivas Vamsi Parasa
On Wed, 6 Dec 2023 18:41:26 GMT, Vladimir Kozlov wrote: >> Srinivas Vamsi Parasa has updated the pull request incrementally with one >> additional commit since the last revision: >> >> add missing header files > > src/hotspot/share/opto/library_call.cpp

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v10]

2023-12-06 Thread Srinivas Vamsi Parasa
57.175 | 5.7 > ArraysSort.floatSort | 10 | 4299.519 | 862.63 | 5.0 > ArraysSort.floatSort | 100 | 50889.4 | 10972.19 | 4.6 > > > > > > xmlns:o="urn:schemas-microsoft-com:office:office" > xmlns:x="urn:schemas-microsoft-com:office:excel" >

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v10]

2023-12-06 Thread Srinivas Vamsi Parasa
On Wed, 6 Dec 2023 17:42:39 GMT, Jatin Bhateja wrote: > LGTM, thanks! Thanks Jatin! - PR Comment: https://git.openjdk.org/jdk/pull/16534#issuecomment-1843372385

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v9]

2023-12-06 Thread Srinivas Vamsi Parasa
On Tue, 5 Dec 2023 19:19:23 GMT, Jatin Bhateja wrote: >> Srinivas Vamsi Parasa has updated the pull request incrementally with one >> additional commit since the last revision: >> >> remove unused avx2 64 bit sort functions; add assertions > > src/java.base

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v8]

2023-12-06 Thread Srinivas Vamsi Parasa
On Tue, 5 Dec 2023 19:37:34 GMT, Jatin Bhateja wrote: >> Srinivas Vamsi Parasa has updated the pull request with a new target base >> due to a merge or a rebase. The incremental webrev excludes the unrelated >> changes brought in by the merge/rebase. The pull request contains

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v9]

2023-12-06 Thread Srinivas Vamsi Parasa
On Wed, 6 Dec 2023 11:59:19 GMT, Magnus Ihse Bursie wrote: >> Hi Magnus (@magicus), >> >>> Are you saying that when compiling with GCC 6, it will just silently ignore >>> `-std=c++17`? I'd have assumed that it printed a warning or error about an >>> unknown or invalid option, if C++17 is not

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v9]

2023-12-06 Thread Srinivas Vamsi Parasa
57.175 | 5.7 > ArraysSort.floatSort | 10 | 4299.519 | 862.63 | 5.0 > ArraysSort.floatSort | 100 | 50889.4 | 10972.19 | 4.6 > > > > > > xmlns:o="urn:schemas-microsoft-com:office:office" > xmlns:x="urn:schemas-microsoft-com:office:excel"

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v8]

2023-12-06 Thread Srinivas Vamsi Parasa
On Tue, 5 Dec 2023 19:33:48 GMT, Jatin Bhateja wrote: >> Srinivas Vamsi Parasa has updated the pull request with a new target base >> due to a merge or a rebase. The incremental webrev excludes the unrelated >> changes brought in by the merge/rebase. The pull request contains

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v8]

2023-12-05 Thread Srinivas Vamsi Parasa
On Tue, 5 Dec 2023 11:19:00 GMT, Magnus Ihse Bursie wrote: >> Hi Marcus (@magicus), please see the updated code which added guards to >> check for GCC version >= 7.5 in >> `src/java.base/linux/native/libsimdsort/{avx2-linux-qsort.cpp, >> avx512-linux-qsort.cpp}`. GCC >= 7.5 is needed to compil

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v8]

2023-12-04 Thread Srinivas Vamsi Parasa
On Mon, 4 Dec 2023 22:15:24 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX2 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v8]

2023-12-04 Thread Srinivas Vamsi Parasa
On Mon, 4 Dec 2023 11:48:44 GMT, Magnus Ihse Bursie wrote: >>> But you are saying that you want to skip building this library unless you >>> have a gcc version that supports c++17? >>> >> Yes, the request is to skip building the simdsort library if GCC version is >> < 8 as only GCC >= 8 suppor

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v8]

2023-12-04 Thread Srinivas Vamsi Parasa
57.175 | 5.7 > ArraysSort.floatSort | 10 | 4299.519 | 862.63 | 5.0 > ArraysSort.floatSort | 100 | 50889.4 | 10972.19 | 4.6 > > > > > > xmlns:o="urn:schemas-microsoft-com:office:office" > xmlns:x="urn:schemas-microsoft-com:office:excel" >

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v7]

2023-12-04 Thread Srinivas Vamsi Parasa
57.175 | 5.7 > ArraysSort.floatSort | 10 | 4299.519 | 862.63 | 5.0 > ArraysSort.floatSort | 100 | 50889.4 | 10972.19 | 4.6 > > > > > > xmlns:o="urn:schemas-microsoft-com:office:office" > xmlns:x="urn:schemas-microsoft-com:office:excel" &

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v6]

2023-11-30 Thread Srinivas Vamsi Parasa
On Thu, 30 Nov 2023 20:07:19 GMT, Magnus Ihse Bursie wrote: > But you are saying that you want to skip building this library unless you > have a gcc version that supports c++17? > Yes, the request is to skip building the simdsort library if GCC version is < 8 as only GCC >= 8 supports C++17 fe

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v6]

2023-11-30 Thread Srinivas Vamsi Parasa
57.175 | 5.7 > ArraysSort.floatSort | 10 | 4299.519 | 862.63 | 5.0 > ArraysSort.floatSort | 100 | 50889.4 | 10972.19 | 4.6 > > > > > > xmlns:o="urn:schemas-microsoft-com:office:office" > xmlns:x="urn:schemas-microsoft-com:office:excel" >

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v5]

2023-11-30 Thread Srinivas Vamsi Parasa
On Thu, 30 Nov 2023 09:38:22 GMT, Magnus Ihse Bursie wrote: >> Seems a bit odd to me too as the existing simd code seems to C code residing >> in .cpp files for some reason. > > Yeah, that is also a good point. Why setting C++ flags in CFLAGS, and not > just CXXFLAGS? > > Also @vamsi-parasa, d

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v5]

2023-11-30 Thread Srinivas Vamsi Parasa
57.175 | 5.7 > ArraysSort.floatSort | 10 | 4299.519 | 862.63 | 5.0 > ArraysSort.floatSort | 100 | 50889.4 | 10972.19 | 4.6 > > > > > > xmlns:o="urn:schemas-microsoft-com:office:office" > xmlns:x="urn:schemas-microsoft-com:office:excel" >

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v4]

2023-11-30 Thread Srinivas Vamsi Parasa
On Thu, 30 Nov 2023 09:38:22 GMT, Magnus Ihse Bursie wrote: >> Seems a bit odd to me too as the existing simd code seems to C code residing >> in .cpp files for some reason. > > Yeah, that is also a good point. Why setting C++ flags in CFLAGS, and not > just CXXFLAGS? > > Also @vamsi-parasa, d

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v4]

2023-11-28 Thread Srinivas Vamsi Parasa
57.175 | 5.7 > ArraysSort.floatSort | 10 | 4299.519 | 862.63 | 5.0 > ArraysSort.floatSort | 100 | 50889.4 | 10972.19 | 4.6 > > > > > > xmlns:o="urn:schemas-microsoft-com:office:office" > xmlns:x="urn:schemas-microsoft-com:office:

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v2]

2023-11-28 Thread Srinivas Vamsi Parasa
On Tue, 28 Nov 2023 00:08:00 GMT, Srinivas Vamsi Parasa wrote: >> src/hotspot/share/opto/library_call.cpp line 5391: >> >>> 5389: BasicType bt = elem_type->basic_type(); >>> 5390: // Disable the intrinsic for 64-bit types with AVX2 >>> 539

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v2]

2023-11-28 Thread Srinivas Vamsi Parasa
On Tue, 28 Nov 2023 12:25:57 GMT, Jatin Bhateja wrote: >> src/hotspot/share/opto/library_call.cpp line 5448: >> >>> 5446: BasicType bt = elem_type->basic_type(); >>> 5447: // Disable the intrinsic for 64-bit types with AVX2 >>> 5448: if ((bt == T_LONG || bt == T_DOUBLE) && UseAVX == 2) { >

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v2]

2023-11-28 Thread Srinivas Vamsi Parasa
On Tue, 28 Nov 2023 12:23:00 GMT, Jatin Bhateja wrote: >> Srinivas Vamsi Parasa has updated the pull request with a new target base >> due to a merge or a rebase. The incremental webrev excludes the unrelated >> changes brought in by the merge/rebase. The pull r

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v3]

2023-11-28 Thread Srinivas Vamsi Parasa
57.175 | 5.7 > ArraysSort.floatSort | 10 | 4299.519 | 862.63 | 5.0 > ArraysSort.floatSort | 100 | 50889.4 | 10972.19 | 4.6 > > > > > > xmlns:o="urn:schemas-microsoft-com:office:office" > xmlns:x="urn:schemas-microsoft-com:office:excel" >

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v2]

2023-11-28 Thread Srinivas Vamsi Parasa
On Mon, 27 Nov 2023 23:44:25 GMT, Sandhya Viswanathan wrote: >> Not listed here: https://oca.opensource.oracle.com/?ojr=contributors > > Yes, Vamsi is part of Intel Java team. He also has the author status > (https://openjdk.org/census#sparasa). > @sviswa7 I am asking about the copyright holde

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v2]

2023-11-27 Thread Srinivas Vamsi Parasa
On Tue, 28 Nov 2023 00:04:55 GMT, Sandhya Viswanathan wrote: >> Srinivas Vamsi Parasa has updated the pull request with a new target base >> due to a merge or a rebase. The incremental webrev excludes the unrelated >> changes brought in by the merge/rebase. The pull r

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v2]

2023-11-17 Thread Srinivas Vamsi Parasa
ArraysSort.longSort | 25 | 0.101 | 0.073 | 1.4 > ArraysSort.longSort | 50 | 0.227 | 0.219 | 1.0 > ArraysSort.longSort | 75 | 0.446 | 0.332 | 1.3 > ArraysSort.longSort | 100 | 0.714 | 0.557 | 1.3 > ArraysSort.longSort | 1000 ... Srinivas Vamsi Parasa has updated the pull request with a ne

Re: RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, long, float and double arrays)

2023-11-15 Thread Srinivas Vamsi Parasa
On Wed, 15 Nov 2023 15:15:37 GMT, Magnus Ihse Bursie wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX2 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float and double arrays. >> >> F

RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, long, float and double arrays)

2023-11-14 Thread Srinivas Vamsi Parasa
The goal is to develop faster sort routines for x86_64 CPUs by taking advantage of AVX2 instructions. This enhancement provides an order of magnitude speedup for Arrays.sort() using int, long, float and double arrays. For serial sort on random data, this PR shows upto ~7.5x improvement for 32-bi

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v42]

2023-10-14 Thread Srinivas Vamsi Parasa
On Sat, 14 Oct 2023 03:21:52 GMT, himichael wrote: >>> my question is that this feature should improve performance several times, >>> but it doesn't look like there's much difference between open jdk 22.19 and >>> jdk 8. is there a problem with my configuration ? >> >> Hello @himichael, >> >>

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v42]

2023-10-13 Thread Srinivas Vamsi Parasa
On Fri, 13 Oct 2023 10:31:14 GMT, himichael wrote: > my question is that this feature should improve performance several times, > but it doesn't look like there's much difference between open jdk 22.19 and > jdk 8. is there a problem with my configuration ? Hello @himichael, Using your code s

Integrated: 8317763: Follow-up to AVX512 intrinsics for Arrays.sort() PR

2023-10-11 Thread Srinivas Vamsi Parasa
On Tue, 10 Oct 2023 16:44:03 GMT, Srinivas Vamsi Parasa wrote: > The goal of this PR is to address the follow-up comments to the SIMD > accelerated sort PR (#14227) which implemented AVX512 intrinsics for > Arrays.sort() methods. > The proposed changes are: > > 1) Restric

Re: RFR: 8317763: Follow-up to AVX512 intrinsics for Arrays.sort() PR [v5]

2023-10-11 Thread Srinivas Vamsi Parasa
On Thu, 12 Oct 2023 04:41:37 GMT, Vladimir Kozlov wrote: > My tier1-3,xcomp testing for v04 passed. I am integrating these changes. Lets > continue discussion about changes for AMD in > https://bugs.openjdk.org/browse/JDK-8317976. Thank you, Vladimir! - PR Comment: https://git.op

Re: RFR: 8317763: Follow-up to AVX512 intrinsics for Arrays.sort() PR [v4]

2023-10-11 Thread Srinivas Vamsi Parasa
On Wed, 11 Oct 2023 20:48:06 GMT, Erik Joelsson wrote: >> Srinivas Vamsi Parasa has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add @ForceInline annotation to insertion and mixedInsertion sort > > make/modu

Re: RFR: 8317763: Follow-up to AVX512 intrinsics for Arrays.sort() PR [v2]

2023-10-11 Thread Srinivas Vamsi Parasa
On Wed, 11 Oct 2023 20:31:05 GMT, Srinivas Vamsi Parasa wrote: >> Hi @vamsi-parasa, >> >> Both methods mixedInsertionSort and insertionSort are covered by intrinsics. >> But insertionSort is run on leftmnost (one) part only and on small ( < >> MAX_INSERTION

Re: RFR: 8317763: Follow-up to AVX512 intrinsics for Arrays.sort() PR [v5]

2023-10-11 Thread Srinivas Vamsi Parasa
show_bug.cgi?id=105593 > 3) Minor changes in Javadoc strings Srinivas Vamsi Parasa has updated the pull request incrementally with one additional commit since the last revision: Revert @ForceInline annotations for small array sort methods - Changes: - all: https://git.open

Re: RFR: 8317763: Follow-up to AVX512 intrinsics for Arrays.sort() PR [v2]

2023-10-11 Thread Srinivas Vamsi Parasa
On Wed, 11 Oct 2023 07:10:57 GMT, iaroslavski wrote: > To have clear picture could you please run benchmarking to compare both > cases: current implementation and implementation with Java insertionSort only? > > see changes `sort(int.class, a, Unsafe.ARRAY_INT_BASE_OFFSET, low, high, > DualPiv

Re: RFR: 8317763: Follow-up to AVX512 intrinsics for Arrays.sort() PR [v4]

2023-10-11 Thread Srinivas Vamsi Parasa
On Wed, 11 Oct 2023 17:28:12 GMT, Srinivas Vamsi Parasa wrote: >> The goal of this PR is to address the follow-up comments to the SIMD >> accelerated sort PR (#14227) which implemented AVX512 intrinsics for >> Arrays.sort() methods. >> The proposed changes are: >

Re: RFR: 8317763: Follow-up to AVX512 intrinsics for Arrays.sort() PR [v3]

2023-10-11 Thread Srinivas Vamsi Parasa
On Wed, 11 Oct 2023 06:59:47 GMT, iaroslavski wrote: > Also @forceinline in these changes only works for case when new intrinsics > are not used. I would suggest to adapt/update JMH benchmark to cover all > cases and see effect @forceinline without intrinsics. That will tell us which > @forcei

Re: RFR: 8317763: Follow-up to AVX512 intrinsics for Arrays.sort() PR [v4]

2023-10-11 Thread Srinivas Vamsi Parasa
show_bug.cgi?id=105593 > 3) Minor changes in Javadoc strings Srinivas Vamsi Parasa has updated the pull request incrementally with one additional commit since the last revision: Add @ForceInline annotation to insertion and mixedInsertion sort - Changes: - all: https://git.open

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v42]

2023-10-09 Thread Srinivas Vamsi Parasa
On Mon, 9 Oct 2023 18:15:12 GMT, Paul Sandoz wrote: > > _Mailing list message from [Florian Weimer](mailto:f...@deneb.enyo.de) on > > [hotspot-runtime-dev](mailto:hotspot-runtime-...@mail.openjdk.org):_ > > I believe this has introduced a build failure with GCC 12.2 on Debian 12.1: > > I believ

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v42]

2023-10-09 Thread Srinivas Vamsi Parasa
On Sun, 8 Oct 2023 06:18:13 GMT, Danny Thomas wrote: > A [discussion on > Reddit](https://www.reddit.com/r/java/comments/171t5sj/heads_up_openjdk_implementation_of_avx512_based/) > raised that this had the potential to regress sort performance on AMD Zen 4. > The poster didn't have access to Z

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v42]

2023-10-09 Thread Srinivas Vamsi Parasa
On Thu, 5 Oct 2023 23:36:48 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float

Integrated: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays)

2023-10-06 Thread Srinivas Vamsi Parasa
On Tue, 30 May 2023 18:54:50 GMT, Srinivas Vamsi Parasa wrote: > The goal is to develop faster sort routines for x86_64 CPUs by taking > advantage of AVX512 instructions. This enhancement provides an order of > magnitude speedup for Arrays.sort() using int, long, float and doub

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v42]

2023-10-06 Thread Srinivas Vamsi Parasa
On Fri, 6 Oct 2023 18:28:21 GMT, Vladimir Kozlov wrote: > My tier1-7 testing passed. Good. Thank you, Vladimir! - PR Comment: https://git.openjdk.org/jdk/pull/14227#issuecomment-1751254526

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v41]

2023-10-05 Thread Srinivas Vamsi Parasa
On Thu, 5 Oct 2023 18:46:46 GMT, Vladimir Kozlov wrote: > In general it looks good. I have some code style comments and file name > change request. After you fix that I will need to rerun testing for it before > approval. Hello Vladimir (@vnkozlov), Thank you for the suggestions related to th

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v42]

2023-10-05 Thread Srinivas Vamsi Parasa
raysSort.longSort | 100 | 0.76| 0.58 > | 1.3 | > | ArraysSort.longSort | 1000| 10.449 | 6.239 > | 1.7 | > | ArraysSort.longSort | 1 | 307.074 | 70.284 > | **4.4** | >

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v41]

2023-09-22 Thread Srinivas Vamsi Parasa
raysSort.longSort | 100 | 0.76| 0.58 > | 1.3 | > | ArraysSort.longSort | 1000| 10.449 | 6.239 > | 1.7 | > | ArraysSort.longSort | 1 | 307.074 | 70.284 > | **4.4** | > |

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v40]

2023-09-21 Thread Srinivas Vamsi Parasa
On Thu, 21 Sep 2023 16:44:52 GMT, Paul Sandoz wrote: >> Srinivas Vamsi Parasa has updated the pull request incrementally with one >> additional commit since the last revision: >> >> change variable names of indexPivot* to pivotIndex* > > test/jdk/java/ut

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v40]

2023-09-21 Thread Srinivas Vamsi Parasa
On Thu, 21 Sep 2023 09:32:18 GMT, Magnus Ihse Bursie wrote: >> Srinivas Vamsi Parasa has updated the pull request incrementally with one >> additional commit since the last revision: >> >> change variable names of indexPivot* to pivotIndex* > > make/modu

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v40]

2023-09-20 Thread Srinivas Vamsi Parasa
On Wed, 20 Sep 2023 17:19:42 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v40]

2023-09-20 Thread Srinivas Vamsi Parasa
raysSort.longSort | 100 | 0.76| 0.58 > | 1.3 | > | ArraysSort.longSort | 1000| 10.449 | 6.239 > | 1.7 | > | ArraysSort.longSort | 1 | 307.074 | 70.284 > | **4.4** | >

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v39]

2023-09-20 Thread Srinivas Vamsi Parasa
On Wed, 20 Sep 2023 07:18:55 GMT, iaroslavski wrote: > ... and suggestion to improve naming: there are inconsistent new names: > pivotIndices, indexPivot1 and indexPivot2. I think names pivotIndices, > pivotIndex1 and pivotIndex2 will be better. Do you agree? Please see the variable names upda

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v39]

2023-09-20 Thread Srinivas Vamsi Parasa
On Tue, 19 Sep 2023 01:57:44 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v39]

2023-09-18 Thread Srinivas Vamsi Parasa
On Tue, 19 Sep 2023 01:57:44 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v38]

2023-09-18 Thread Srinivas Vamsi Parasa
On Mon, 18 Sep 2023 20:08:31 GMT, iaroslavski wrote: >> Srinivas Vamsi Parasa has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Remove the unnecessary exception in single pivot partitioning fallback >> meth

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v39]

2023-09-18 Thread Srinivas Vamsi Parasa
raysSort.longSort | 100 | 0.76| 0.58 > | 1.3 | > | ArraysSort.longSort | 1000| 10.449 | 6.239 > | 1.7 | > | ArraysSort.longSort | 1 | 307.074 | 70.284 > | **4.4**

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v38]

2023-09-18 Thread Srinivas Vamsi Parasa
On Mon, 18 Sep 2023 18:54:07 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v37]

2023-09-18 Thread Srinivas Vamsi Parasa
On Fri, 15 Sep 2023 22:17:42 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v38]

2023-09-18 Thread Srinivas Vamsi Parasa
raysSort.longSort | 100 | 0.76| 0.58 > | 1.3 | > | ArraysSort.longSort | 1000| 10.449 | 6.239 > | 1.7 | > | ArraysSort.longSort | 1 | 307.074 | 70.284 > | **4.4** | &

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v36]

2023-09-18 Thread Srinivas Vamsi Parasa
On Sat, 16 Sep 2023 22:49:14 GMT, iaroslavski wrote: >> Hello Paul, >> >> As suggested, the functional interfaces were moved next to the associated >> methods and also added a `@ForceInline` for `arraySort` in the latest commit. >> >>> I recommend embedding the functional interfaces next to th

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v36]

2023-09-15 Thread Srinivas Vamsi Parasa
On Wed, 13 Sep 2023 23:00:23 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v37]

2023-09-15 Thread Srinivas Vamsi Parasa
raysSort.longSort | 100 | 0.76| 0.58 > | 1.3 | > | ArraysSort.longSort | 1000| 10.449 | 6.239 > | 1.7 | > | ArraysSort.longSort | 1 | 307.074 | 70.284 > |

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v36]

2023-09-13 Thread Srinivas Vamsi Parasa
raysSort.longSort | 100 | 0.76| 0.58 > | 1.3 | > | ArraysSort.longSort | 1000| 10.449 | 6.239 > | 1.7 | > | ArraysSort.longSort | 1 | 307.074 | 70.284 > |

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v36]

2023-09-13 Thread Srinivas Vamsi Parasa
On Wed, 13 Sep 2023 23:00:23 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v34]

2023-09-12 Thread Srinivas Vamsi Parasa
On Mon, 11 Sep 2023 18:17:41 GMT, Jatin Bhateja wrote: >> Srinivas Vamsi Parasa has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix regression when intrinsics are disabled; enable insertion sort in >> int

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v35]

2023-09-12 Thread Srinivas Vamsi Parasa
raysSort.longSort | 100 | 0.76| 0.58 > | 1.3 | > | ArraysSort.longSort | 1000| 10.449 | 6.239 > | 1.7 | > | ArraysSort.longSort | 1 | 307.074 | 70.284 > | **4

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v33]

2023-09-11 Thread Srinivas Vamsi Parasa
On Fri, 8 Sep 2023 05:33:49 GMT, Alan Bateman wrote: > Would it be possible to provide a clear summary on why libx86_64_sort is > being added? I'm trying to understand why these weren't linked into libjvm. Hello Alan, Initially, the reason behind adding libx86_64 (now renamed to libsimdsort in

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v34]

2023-09-08 Thread Srinivas Vamsi Parasa
On Fri, 8 Sep 2023 18:10:33 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v30]

2023-09-08 Thread Srinivas Vamsi Parasa
On Fri, 1 Sep 2023 10:57:57 GMT, iaroslavski wrote: >>> @AlanBateman If it helps, the changes made by @vamsi-parasa to >>> DualPivotQuickSort.java don't change the logic as written in Java. They >>> only carve out the functionality into separate Java methods retaining the >>> meaning exactly a

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v34]

2023-09-08 Thread Srinivas Vamsi Parasa
On Fri, 8 Sep 2023 18:10:33 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v34]

2023-09-08 Thread Srinivas Vamsi Parasa
raysSort.longSort | 100 | 0.76| 0.58 > | 1.3 | > | ArraysSort.longSort | 1000| 10.449 | 6.239 > | 1.7 | > | ArraysSort.longSort | 1 | 307.074 | 70.284 > | **4.4

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v33]

2023-09-07 Thread Srinivas Vamsi Parasa
On Thu, 31 Aug 2023 21:31:40 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v30]

2023-09-06 Thread Srinivas Vamsi Parasa
On Wed, 30 Aug 2023 15:10:45 GMT, Srinivas Vamsi Parasa wrote: >>> Hi Vladimir, Just verified that the test/jdk/java/util/Arrays/Sorting.java >>> is triggering the intrinsic without additional flags >> >> Just to add that Sorting.java has short and long run modes

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v33]

2023-08-31 Thread Srinivas Vamsi Parasa
raysSort.longSort | 100 | 0.76| 0.58 > | 1.3 | > | ArraysSort.longSort | 1000| 10.449 | 6.239 > | 1.7 | > | ArraysSort.longSort | 1 | 307.074 | 70.284 > | **4.4** | >

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v30]

2023-08-31 Thread Srinivas Vamsi Parasa
On Mon, 28 Aug 2023 23:29:43 GMT, Erik Joelsson wrote: >> Srinivas Vamsi Parasa has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Clean up parameters passed to arrayPartition; update the check to load >

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v32]

2023-08-31 Thread Srinivas Vamsi Parasa
raysSort.longSort | 100 | 0.76| 0.58 > | 1.3 | > | ArraysSort.longSort | 1000| 10.449 | 6.239 > | 1.7 | > | ArraysSort.longSort | 1 | 307.074 | 70.284 > | **4.4** | > |

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v30]

2023-08-31 Thread Srinivas Vamsi Parasa
On Tue, 29 Aug 2023 17:00:33 GMT, Srinivas Vamsi Parasa wrote: >> make/modules/java.base/Lib.gmk line 240: >> >>> 238: >>> 239: ifeq ($(call isTargetOs, linux)+$(call isTargetCpu, >>> x86_64)+$(INCLUDE_COMPILER2), true+true+true) >>> 240:

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v31]

2023-08-31 Thread Srinivas Vamsi Parasa
raysSort.longSort | 100 | 0.76| 0.58 > | 1.3 | > | ArraysSort.longSort | 1000| 10.449 | 6.239 > | 1.7 | > | ArraysSort.longSort | 1 | 307.074 | 70.284 > | **4.4** |

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v29]

2023-08-30 Thread Srinivas Vamsi Parasa
On Tue, 29 Aug 2023 20:23:24 GMT, Vladimir Kozlov wrote: >> The shared library approach is being followed currently as an initial >> implementation to demonstrate the value of AVX512 sorting. This will be >> followed up in future with support for Windows as well. >> If it is ok with you, the s

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v30]

2023-08-30 Thread Srinivas Vamsi Parasa
On Wed, 30 Aug 2023 08:48:09 GMT, Alan Bateman wrote: >>> > > Hi, We already have correctness tests. See >>> > > test/jdk/java/util/Arrays/Sorting.java >>> > > The latest version you can find in PR >>> > > https://github.com/openjdk/jdk/pull/13568/files >>> > >>> > >>> > Does test/jdk/java/ut

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v30]

2023-08-30 Thread Srinivas Vamsi Parasa
On Wed, 30 Aug 2023 08:48:09 GMT, Alan Bateman wrote: > > Hi Vladimir, Just verified that the test/jdk/java/util/Arrays/Sorting.java > > is triggering the intrinsic without additional flags > > Just to add that Sorting.java has short and long run modes. The default when > running with jtreg or

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v30]

2023-08-29 Thread Srinivas Vamsi Parasa
On Tue, 29 Aug 2023 20:44:32 GMT, Srinivas Vamsi Parasa wrote: > > > Hi, We already have correctness tests. See > > > test/jdk/java/util/Arrays/Sorting.java > > > The latest version you can find in PR > > > https://github.com/openjdk/jdk/pull/13568/files &

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v30]

2023-08-29 Thread Srinivas Vamsi Parasa
On Tue, 29 Aug 2023 20:36:04 GMT, Vladimir Kozlov wrote: > > Hi, We already have correctness tests. See > > test/jdk/java/util/Arrays/Sorting.java > > The latest version you can find in PR > > https://github.com/openjdk/jdk/pull/13568/files > > Does test/jdk/java/util/Arrays/Sorting.java trigg

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v30]

2023-08-29 Thread Srinivas Vamsi Parasa
On Tue, 29 Aug 2023 20:36:04 GMT, Vladimir Kozlov wrote: > Hi, We already have correctness tests. See > test/jdk/java/util/Arrays/Sorting.java > > The latest version you can find in PR > https://github.com/openjdk/jdk/pull/13568/files Hello Vladimir (@iaroslavski), Thank you for providing th

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v29]

2023-08-29 Thread Srinivas Vamsi Parasa
On Tue, 29 Aug 2023 16:02:57 GMT, Vladimir Kozlov wrote: >> If it's tied to GCC as well, then we should probably include that in the >> condition here unless it's also expected to work with Clang. >> (`TOOLCHAIN_TYPE` = `gcc`) > >> The reason this PR is focused on Linux is because the AVX512 so

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v30]

2023-08-29 Thread Srinivas Vamsi Parasa
On Tue, 29 Aug 2023 16:04:58 GMT, Vladimir Kozlov wrote: > My testing passed. But I am not sure correctness of code is fully tested. For > now we have only JMH benchmark for this new code. Do we have JDK test which > can check correctness of this code? Hi Vladimir, will add the JDK tests to ch

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v30]

2023-08-29 Thread Srinivas Vamsi Parasa
On Mon, 28 Aug 2023 23:35:56 GMT, Erik Joelsson wrote: >> Srinivas Vamsi Parasa has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Clean up parameters passed to arrayPartition; update the check to load >

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v29]

2023-08-28 Thread Srinivas Vamsi Parasa
On Fri, 25 Aug 2023 13:20:09 GMT, Erik Joelsson wrote: >> Srinivas Vamsi Parasa has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Remove unnecessary import in Arrays.java > > make/modules/java.ba

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v29]

2023-08-28 Thread Srinivas Vamsi Parasa
On Fri, 25 Aug 2023 22:04:45 GMT, Vladimir Kozlov wrote: >> Srinivas Vamsi Parasa has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Remove unnecessary import in Arrays.java > > src/hotspot/cpu/x86/stub

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v30]

2023-08-28 Thread Srinivas Vamsi Parasa
raysSort.longSort | 100 | 0.76| 0.58 > | 1.3 | > | ArraysSort.longSort | 1000| 10.449 | 6.239 > | 1.7 | > | ArraysSort.longSort | 1 | 307.074 | 70.284 > | **4.4** | &g

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v26]

2023-08-28 Thread Srinivas Vamsi Parasa
On Fri, 25 Aug 2023 01:52:32 GMT, Sandhya Viswanathan wrote: >> pivotIndices array is being passed as a parameter to the partition intrinsic >> as it is updated in-place with the new pivot indices after partitioning. The >> Unsafe.ARRAY_INT_BASE_OFFSET is being used in libary_call.cpp to get t

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v22]

2023-08-25 Thread Srinivas Vamsi Parasa
On Thu, 24 Aug 2023 06:23:29 GMT, Srinivas Vamsi Parasa wrote: >>> Improvements are nice but it would not pay off if you have big regressions. >>> I can accept 0.9x but 0.4x - 0.8x regressions should be investigated and >>> implementation adjusted to avo

  1   2   >