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.

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.

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) [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

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

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

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

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

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

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: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

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

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

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

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

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

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

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) [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

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 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

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

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) [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

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

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

2023-08-24 Thread Srinivas Vamsi Parasa
On Fri, 25 Aug 2023 02:07:54 GMT, Sandhya Viswanathan wrote: >> Srinivas Vamsi Parasa has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Decomposed DPQS using AVX512 partitioning and AVX512 sort (for small >

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

2023-08-24 Thread Srinivas Vamsi Parasa
On Fri, 25 Aug 2023 02:07:54 GMT, Sandhya Viswanathan wrote: >> Srinivas Vamsi Parasa has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Decomposed DPQS using AVX512 partitioning and AVX512 sort (for small >

Re: RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v7]

2023-08-11 Thread Srinivas Vamsi Parasa
On Thu, 15 Jun 2023 09:21:13 GMT, Laurent Bourgès wrote: >> * improved mixed insertion sort (makes whole sorting faster) >> * introduced Radix which sort shows several times boost of performance and >> has linear complexity instead of n*ln(n) >> * improved merging sort for almost sorted data

Re: RFR: 8285973: x86_64: Improve fp comparison and cmove for eq/ne [v2]

2022-05-19 Thread Srinivas Vamsi Parasa
On Wed, 18 May 2022 14:59:49 GMT, Quan Anh Mai wrote: >> Hi, >> >> This patch optimises the matching rules for floating-point comparison with >> respects to eq/ne on x86-64 >> >> 1, When the inputs of a comparison is the same (i.e `isNaN` patterns), `ZF` >> is always set, so we don't need

Re: RFR: 8282221: x86 intrinsics for divideUnsigned and remainderUnsigned methods in java.lang.Integer and java.lang.Long [v13]

2022-04-10 Thread Srinivas Vamsi Parasa
On Mon, 11 Apr 2022 02:01:17 GMT, David Holmes wrote: > This change appears to be causing crashes in tier4 - possibly Xcomp related: > > # assert(ctrl == kit.control()) failed: Control flow was added although the > intrinsic bailed out > I will file a new bug. Thank you for informing this

Re: RFR: 8282221: x86 intrinsics for divideUnsigned and remainderUnsigned methods in java.lang.Integer and java.lang.Long [v4]

2022-04-10 Thread Srinivas Vamsi Parasa
On Wed, 6 Apr 2022 06:23:47 GMT, Jatin Bhateja wrote: >>> Also need a jtreg test for this. >> >> Thanks Sandhya for the review. Made the suggested changes and added jtreg >> tests as well. > > Hi @vamsi-parasa , thanks for addressing my comments, looks good to me > otherwise apart from the

Integrated: 8282221: x86 intrinsics for divideUnsigned and remainderUnsigned methods in java.lang.Integer and java.lang.Long

2022-04-09 Thread Srinivas Vamsi Parasa
On Tue, 22 Feb 2022 09:24:47 GMT, Srinivas Vamsi Parasa wrote: > Optimizes the divideUnsigned() and remainderUnsigned() methods in > java.lang.Integer and java.lang.Long classes using x86 intrinsics. This > change shows 3x improvement for Integer methods and upto 25% improvement fo

Re: RFR: 8282221: x86 intrinsics for divideUnsigned and remainderUnsigned methods in java.lang.Integer and java.lang.Long [v13]

2022-04-09 Thread Srinivas Vamsi Parasa
On Sat, 9 Apr 2022 18:25:54 GMT, Vladimir Kozlov wrote: > Testing passed. Thank you Vladimir! - PR: https://git.openjdk.java.net/jdk/pull/7572

Re: RFR: 8282221: x86 intrinsics for divideUnsigned and remainderUnsigned methods in java.lang.Integer and java.lang.Long [v8]

2022-04-08 Thread Srinivas Vamsi Parasa
On Fri, 8 Apr 2022 00:55:50 GMT, Srinivas Vamsi Parasa wrote: >> I have few comments. > > Hi Vladimir (@vnkozlov), > > Incorporated all the suggestions you made in the previous review and pushed a > new commit. > Please let me know if anything else is needed. >

Re: RFR: 8282221: x86 intrinsics for divideUnsigned and remainderUnsigned methods in java.lang.Integer and java.lang.Long [v13]

2022-04-08 Thread Srinivas Vamsi Parasa
which fuses > division and modulus operations if needed. The DivMod optimization shows 3x > improvement for Integer and ~65% improvement for Long. Srinivas Vamsi Parasa has updated the pull request incrementally with one additional commit since the last revision: Fix the divmod crash due

Re: RFR: 8282221: x86 intrinsics for divideUnsigned and remainderUnsigned methods in java.lang.Integer and java.lang.Long [v12]

2022-04-07 Thread Srinivas Vamsi Parasa
which fuses > division and modulus operations if needed. The DivMod optimization shows 3x > improvement for Integer and ~65% improvement for Long. Srinivas Vamsi Parasa has updated the pull request incrementally with one additional commit since the last revision: uncomment zero in int

Re: RFR: 8282221: x86 intrinsics for divideUnsigned and remainderUnsigned methods in java.lang.Integer and java.lang.Long [v4]

2022-04-07 Thread Srinivas Vamsi Parasa
On Wed, 6 Apr 2022 00:45:37 GMT, Vladimir Kozlov wrote: >> Thanks for suggesting the enhancement. This enhancement will be implemented >> as a part of https://bugs.openjdk.java.net/browse/JDK-8282365 > > You do need `Ideal()` methods at least to check for dead code. Added the Ideal() methods

Re: RFR: 8282221: x86 intrinsics for divideUnsigned and remainderUnsigned methods in java.lang.Integer and java.lang.Long [v8]

2022-04-07 Thread Srinivas Vamsi Parasa
On Wed, 6 Apr 2022 00:46:01 GMT, Vladimir Kozlov wrote: >> Srinivas Vamsi Parasa has updated the pull request incrementally with one >> additional commit since the last revision: >> >> add error msg for jtreg test > > I have few comments. Hi Vladimir

Re: RFR: 8282221: x86 intrinsics for divideUnsigned and remainderUnsigned methods in java.lang.Integer and java.lang.Long [v11]

2022-04-07 Thread Srinivas Vamsi Parasa
which fuses > division and modulus operations if needed. The DivMod optimization shows 3x > improvement for Integer and ~65% improvement for Long. Srinivas Vamsi Parasa has updated the pull request incrementally with one additional commit since the last revision: Idead Ideal for udiv, umo

Re: RFR: 8282221: x86 intrinsics for divideUnsigned and remainderUnsigned methods in java.lang.Integer and java.lang.Long [v10]

2022-04-06 Thread Srinivas Vamsi Parasa
which fuses > division and modulus operations if needed. The DivMod optimization shows 3x > improvement for Integer and ~65% improvement for Long. Srinivas Vamsi Parasa has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 15 commits:

[issue4753] Faster opcode dispatch on gcc

2015-05-27 Thread Srinivas Vamsi Parasa
Srinivas Vamsi Parasa added the comment: Hi All, This is Vamsi from Server Scripting Languages Optimization team at Intel Corporation. Would like to submit a request to enable the computed goto based dispatch in Python 2.x (which happens to be enabled by default in Python 3 given its

<    1   2   3