Re: [Lambda]parallel sort stream slow than series sort

2020-09-28 Thread Simon Roberts
Hi Tony, At this point, I would venture 1) This is still the wrong forum. I would think that stackoverflow is a far more appropriate place for discussions about how to use an api. This one, as best I understand it, is about *developing* those libraries. 2) Concurrency inevitably *increases* the

Re: [Lambda]parallel sort stream slow than series sort

2020-09-25 Thread Vladimir Yaroslavskiy
>  Hi,   Could you please check with OpenJDK version 14+? Let us know the results.   Thank you, Vladimir   >Date: Fri, 25 Sep 2020 18:09:57 +0800From: tonytao < tonytao0...@outlook.com > >To: core-libs-dev@openjdk.java.net >Subject: [Lambda]parallel sort stream slow than serie

Re: [Lambda]parallel sort stream slow than series sort

2020-09-25 Thread Simon Roberts
Tests like this are rarely meaningful. In particular you have a random number generator in there. They are often built on single threaded code protected by mutual exclusion. That of itself prevents the code ever going faster than sequential code, and in fact usually makes it slower due to the addit

[Lambda]parallel sort stream slow than series sort

2020-09-25 Thread tonytao
hi, I wrote a test case to test stream performance,but the parallel sort always slow than the series sort.I test the data size in : 20,000 , 5,000,000, 10,000,000 , 20,000,000 . attatched is the test case source code. jdk version : openjdk version "11.0.8" 2020-07-14 OpenJDK Runtime Environ