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

2023-10-24 Thread iaroslavski
On Wed, 20 Sep 2023 16:33:56 GMT, Paul Sandoz wrote: >>> > Alan, you mentioned that DualPivotQuicksort will need detailed review. >>> > Can we go ahead and start reviewing? Laurent checked performance, JMH >>> > results look fine. >>> >>> As before, I think the main question with this change i

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

2023-10-22 Thread iaroslavski
On Wed, 20 Sep 2023 16:33:56 GMT, Paul Sandoz wrote: > > Hi Paul (@PaulSandoz), Alan (@AlanBateman), Any update? Do you agree with > > Radix sort in parallel case only? > > I think its definitely a better fit, but another aspect of my previous > comment was wondering if we need a radix sort if

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

2023-10-11 Thread iaroslavski
On Wed, 11 Oct 2023 20:10:12 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 effe

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

2023-10-11 Thread iaroslavski
gt; > > intrinsics are disabled. > > > Thanks, Vamsi > > > > > > @vamsi-parasa Please revert changes (adding @forceinline to insertionSort > > and mixedInsertionSort) - I checked: initinal version works faster. > > @iaroslavski Vladimir, have you used

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

2023-10-11 Thread iaroslavski
On Wed, 11 Oct 2023 17:22:56 GMT, Srinivas Vamsi Parasa 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

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

2023-10-11 Thread iaroslavski
On Tue, 10 Oct 2023 20:04:48 GMT, Srinivas Vamsi Parasa wrote: >> In #14227, you inadvertently added an extra space at line 230 in >> make/modules/java.base/Lib.gmk >> (https://github.com/openjdk/jdk/pull/14227/files#diff-c2e113e4b2661697750fd5e6dcc0908fa98563ccfb3801c8b0e3a70174041b81). >> >>

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

2023-10-11 Thread iaroslavski
On Tue, 10 Oct 2023 22:29:55 GMT, Vladimir Kozlov wrote: >> Srinivas Vamsi Parasa has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fix whitespace in build script > > Also @forceinline in these changes only works for case when new intrinsi

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

2023-10-11 Thread iaroslavski
On Tue, 10 Oct 2023 22:29:55 GMT, Vladimir Kozlov 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 > @fo

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

2023-10-10 Thread iaroslavski
On Tue, 10 Oct 2023 20:04:48 GMT, Srinivas Vamsi Parasa wrote: >> In #14227, you inadvertently added an extra space at line 230 in >> make/modules/java.base/Lib.gmk >> (https://github.com/openjdk/jdk/pull/14227/files#diff-c2e113e4b2661697750fd5e6dcc0908fa98563ccfb3801c8b0e3a70174041b81). >> >>

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

2023-10-07 Thread iaroslavski
On Fri, 6 Oct 2023 18:45:59 GMT, Srinivas Vamsi Parasa wrote: >> My tier1-7 testing passed. Good. > >> My tier1-7 testing passed. Good. > > Thank you, Vladimir! @vamsi-parasa Please disrard my request to change high -> end. I find out a way to update Java code only. I updated my previous comme

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

2023-10-07 Thread iaroslavski
On Fri, 6 Oct 2023 18:45:59 GMT, Srinivas Vamsi Parasa wrote: >> My tier1-7 testing passed. Good. > >> My tier1-7 testing passed. Good. > > Thank you, Vladimir! Hi @vamsi-parasa, If DualPivotQuicksort.java is updated, can you improve `partitionDualPivot` and `partitionSinglePivot` methods a l

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

2023-10-06 Thread iaroslavski
On Fri, 6 Oct 2023 18:45:59 GMT, Srinivas Vamsi Parasa wrote: >> My tier1-7 testing passed. Good. > >> My tier1-7 testing passed. Good. > > Thank you, Vladimir! Hi @vamsi-parasa, May be too late but there is one question. We have 2 new methods `private static void sort(Class elemType, A array

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

2023-09-23 Thread iaroslavski
eresting comparisons are: >> >> 1. AVX512 sort (your implementation) vs. DualPivotQuicksort_RadixForParallel >> (contains AVX512 + radix for parallel sort) >> >> https://github.com/iaroslavski/sorting/blob/master/radixsort/DualPivotQuicksort_RadixForParall

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

2023-09-21 Thread iaroslavski
om your runs will help us to detect the impact of Radix sort in *vectorized* sorting, this is very important topic. Interesting comparisons are: 1. AVX512 sort (your implementation) vs. DualPivotQuicksort_RadixForParallel (contains AVX512 + radix for parallel sort) https://githu

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

2023-09-21 Thread iaroslavski
On Wed, 20 Sep 2023 22:46:16 GMT, Srinivas Vamsi Parasa 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* > > Hi Vladimir, > > Just trying to understand:

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

2023-09-20 Thread iaroslavski
On Wed, 20 Sep 2023 16:33:56 GMT, Paul Sandoz wrote: > I think its definitely a better fit, but another aspect of my previous > comment was wondering if we need a radix sort if the vectorized quicksort > implementation is fast enough. IMO we need to compare performance results > with the vecto

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

2023-09-20 Thread iaroslavski
one > additional commit since the last revision: > > change variable names of indexPivot* to pivotIndex* Hi Vamsi, In this comment https://github.com/openjdk/jdk/pull/13568#issuecomment-1728082819 Paul suggested comparing of performance. Could you please run benchmarking of the followi

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

2023-09-20 Thread iaroslavski
On Fri, 15 Sep 2023 20:17:17 GMT, Paul Sandoz wrote: >>> Alan, you mentioned that DualPivotQuicksort will need detailed review. Can >>> we go ahead and start reviewing? Laurent checked performance, JMH results >>> look fine. >> >> As before, I think the main question with this change is whethe

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

2023-09-20 Thread iaroslavski
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 and double arrays. >>

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

2023-09-20 Thread iaroslavski
On Tue, 19 Sep 2023 21:44:00 GMT, iaroslavski wrote: >> Srinivas Vamsi Parasa has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Update DualPivotQuicksort.java >> - Rename arraySort and arrayPartition Java

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

2023-09-19 Thread iaroslavski
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 and double arrays. >>

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

2023-09-18 Thread iaroslavski
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 and double arrays. >>

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

2023-09-18 Thread iaroslavski
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 and double arrays. >>

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

2023-09-16 Thread iaroslavski
On Fri, 15 Sep 2023 22:11:44 GMT, Srinivas Vamsi Parasa wrote: >> Srinivas Vamsi Parasa has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Refactor the sort and partition intrinsics to accept method references for >> fallback functions >

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

2023-09-16 Thread iaroslavski
On Fri, 15 Sep 2023 20:17:17 GMT, Paul Sandoz wrote: > > > Alan, you mentioned that DualPivotQuicksort will need detailed review. > > > Can we go ahead and start reviewing? Laurent checked performance, JMH > > > results look fine. > > > > As before, I think the main question with this change i

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

2023-09-15 Thread iaroslavski
On Wed, 30 Aug 2023 10:55:48 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: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v36]

2023-09-15 Thread iaroslavski
On Thu, 14 Sep 2023 23:03:22 GMT, Paul Sandoz wrote: > That neatly covers multiple element types and Java-based insertion sort > algorithms (although I don't know why we need two since mixed insertion > effectively embeds the other). @PaulSandoz There are two insertion sorts in DPQ: mixedInser

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

2023-09-10 Thread iaroslavski
On Sun, 12 Mar 2023 21:28:59 GMT, iaroslavski wrote: >> Sorting: >> >> - adopt radix sort for sequential and parallel sorts on >> int/long/float/double arrays (almost random and length > 6K) >> - fix tryMergeRuns() to better handle case when the last run i

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

2023-09-08 Thread iaroslavski
On Fri, 1 Sep 2023 06:12:57 GMT, Alan Bateman wrote: >> Hi team, >> @AlanBateman, @rose00, @mbreinhold >> >> There are a big efforts now to improve sorting with x86_64 AVX512 >> https://github.com/openjdk/jdk/pull/14227, no changes of >> Dual-Pivot Quicksort logic. >> >> But at the same time t

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

2023-09-01 Thread iaroslavski
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. The default when >> running

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

2023-08-31 Thread iaroslavski
On Wed, 30 Aug 2023 10:55:48 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: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v30]

2023-08-29 Thread iaroslavski
On Tue, 29 Aug 2023 16:57:11 GMT, Srinivas Vamsi Parasa 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 th

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

2023-08-29 Thread iaroslavski
On Mon, 28 Aug 2023 21:27:25 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 double arrays. >>

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

2023-08-12 Thread iaroslavski
On Sun, 12 Mar 2023 21:28:59 GMT, iaroslavski wrote: >> Sorting: >> >> - adopt radix sort for sequential and parallel sorts on >> int/long/float/double arrays (almost random and length > 6K) >> - fix tryMergeRuns() to better handle case when the last run i

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

2023-07-12 Thread iaroslavski
On Sun, 12 Mar 2023 21:28:59 GMT, iaroslavski wrote: >> Sorting: >> >> - adopt radix sort for sequential and parallel sorts on >> int/long/float/double arrays (almost random and length > 6K) >> - fix tryMergeRuns() to better handle case when the last run i

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

2023-06-08 Thread iaroslavski
On Sun, 12 Mar 2023 21:28:59 GMT, iaroslavski wrote: >> Sorting: >> >> - adopt radix sort for sequential and parallel sorts on >> int/long/float/double arrays (almost random and length > 6K) >> - fix tryMergeRuns() to better handle case when the last run i

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

2023-05-09 Thread iaroslavski
On Sun, 12 Mar 2023 21:28:59 GMT, iaroslavski wrote: >> Sorting: >> >> - adopt radix sort for sequential and parallel sorts on >> int/long/float/double arrays (almost random and length > 6K) >> - fix tryMergeRuns() to better handle case when the last run i

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

2023-04-29 Thread iaroslavski
On Sun, 23 Apr 2023 17:33:38 GMT, Laurent Bourgès wrote: >> * Optimized mixed insertion sort >> * Optimized insertion sort >> * Optimized Radix sort >> * Updated microbenchmark >> >> I am going on previous PR by Vladimir Yaroslavskyi: >> https://github.com/openjdk/jdk/pull/3938 > >

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

2023-04-10 Thread iaroslavski
On Sun, 12 Mar 2023 21:28:59 GMT, iaroslavski wrote: >> Sorting: >> >> - adopt radix sort for sequential and parallel sorts on >> int/long/float/double arrays (almost random and length > 6K) >> - fix tryMergeRuns() to better handle case when the last run i

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

2023-03-12 Thread iaroslavski
sting: > - add new data inputs in tests for sorting > - add min/max/infinity values to float/double testing > - add tests for radix sort iaroslavski has updated the pull request incrementally with one additional commit since the last revision: JDK-8266431: Dual-Pivot Quickso

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

2023-01-17 Thread iaroslavski
On Wed, 9 Nov 2022 21:06:50 GMT, iaroslavski wrote: >> Sorting: >> >> - adopt radix sort for sequential and parallel sorts on >> int/long/float/double arrays (almost random and length > 6K) >> - fix tryMergeRuns() to better handle case when the last run i

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

2022-12-19 Thread iaroslavski
On Wed, 9 Nov 2022 21:06:50 GMT, iaroslavski wrote: >> Sorting: >> >> - adopt radix sort for sequential and parallel sorts on >> int/long/float/double arrays (almost random and length > 6K) >> - fix tryMergeRuns() to better handle case when the last run i

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

2022-11-09 Thread iaroslavski
sting: > - add new data inputs in tests for sorting > - add min/max/infinity values to float/double testing > - add tests for radix sort iaroslavski has updated the pull request incrementally with one additional commit since the last revision: JDK-8266431: Dual-Pivot Quicksort

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

2022-10-31 Thread iaroslavski
sting: > - add new data inputs in tests for sorting > - add min/max/infinity values to float/double testing > - add tests for radix sort iaroslavski has updated the pull request incrementally with one additional commit since the last revision: JDK-8266431: Dual-Pivot Quicksort improveme

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

2022-10-21 Thread iaroslavski
On Tue, 2 Aug 2022 13:57:03 GMT, iaroslavski wrote: >> Sorting: >> >> - adopt radix sort for sequential and parallel sorts on >> int/long/float/double arrays (almost random and length > 6K) >> - fix tryMergeRuns() to better handle case when the last run i

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

2022-08-02 Thread iaroslavski
sting: > - add new data inputs in tests for sorting > - add min/max/infinity values to float/double testing > - add tests for radix sort iaroslavski has updated the pull request incrementally with one additional commit since the last revision: JDK-8266431: Dual-Pivot Quicksort improve

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

2022-07-08 Thread iaroslavski
On Thu, 7 Jul 2022 13:41:17 GMT, Alan Bateman wrote: >> iaroslavski has updated the pull request incrementally with one additional >> commit since the last revision: >> >> JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) >> >> * Fix @sin

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

2022-07-08 Thread iaroslavski
sting: > - add new data inputs in tests for sorting > - add min/max/infinity values to float/double testing > - add tests for radix sort iaroslavski has updated the pull request incrementally with one additional commit since the last revision: JDK-8266431: Dual-Pivot Quicksort imp

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

2022-07-08 Thread iaroslavski
On Wed, 6 Jul 2022 08:49:45 GMT, Сергей Цыпанов wrote: >> iaroslavski has updated the pull request incrementally with one additional >> commit since the last revision: >> >> JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) >> >> *

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

2022-07-06 Thread iaroslavski
On Thu, 30 Jun 2022 16:41:36 GMT, iaroslavski wrote: >> Sorting: >> >> - adopt radix sort for sequential and parallel sorts on >> int/long/float/double arrays (almost random and length > 6K) >> - fix tryMergeRuns() to better handle case when the last run i

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

2022-07-06 Thread iaroslavski
On Thu, 30 Jun 2022 16:41:36 GMT, iaroslavski wrote: >> Sorting: >> >> - adopt radix sort for sequential and parallel sorts on >> int/long/float/double arrays (almost random and length > 6K) >> - fix tryMergeRuns() to better handle case when the last run i

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

2022-06-30 Thread iaroslavski
sting: > - add new data inputs in tests for sorting > - add min/max/infinity values to float/double testing > - add tests for radix sort iaroslavski has updated the pull request incrementally with one additional commit since the last revision: JDK-8266431: Dual-Pivot Quicksort impr

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

2022-06-30 Thread iaroslavski
sting: > - add new data inputs in tests for sorting > - add min/max/infinity values to float/double testing > - add tests for radix sort iaroslavski has updated the pull request incrementally with one additional commit since the last revision: JDK-8266431: Dual-Pivot Quicksort im

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

2022-06-22 Thread iaroslavski
On Mon, 14 Mar 2022 19:12:29 GMT, iaroslavski wrote: >> Sorting: >> >> - adopt radix sort for sequential and parallel sorts on >> int/long/float/double arrays (almost random and length > 6K) >> - fix tryMergeRuns() to better handle case when the last run i