Re: Collectors.toSet() small performance improvement

2016-08-17 Thread Paul Sandoz
> On 16 Aug 2016, at 20:08, Tagir F. Valeev wrote: > > Hello, Paul! > > Thank you. Here's issue: > https://bugs.openjdk.java.net/browse/JDK-8164189 > And webrev: > http://cr.openjdk.java.net/~tvaleev/webrev/8164189/r1/ > Thanks will push today or tomorrow, Paul. > With best regards, > Tagir

Re: Collectors.toSet() small performance improvement

2016-08-16 Thread Tagir F. Valeev
Hello, Paul! Thank you. Here's issue: https://bugs.openjdk.java.net/browse/JDK-8164189 And webrev: http://cr.openjdk.java.net/~tvaleev/webrev/8164189/r1/ With best regards, Tagir Valeev. PS> Hi Tagir, PS> I like it. Please open an issue and i will sponsor the fix for you. PS> Thanks, PS> Paul.

Re: Collectors.toSet() small performance improvement

2016-08-16 Thread Paul Sandoz
Hi Tagir, I like it. Please open an issue and i will sponsor the fix for you. Thanks, Paul. > On 8 Aug 2016, at 22:31, Tagir F. Valeev wrote: > > Hello! > > I'd like to propose a simple performance patch for Collectors.toSet(): > > --- a/src/java.base/share/classes/java/util/stream/Collector

Re: Collectors.toSet() small performance improvement

2016-08-09 Thread Aleksey Shipilev
On 08/09/2016 10:19 AM, Tagir F. Valeev wrote: > AS> Good trick, but does it work properly with the sets that care about the > AS> add order, e.g. LinkedHashSet? I guess our saving grace here is > AS> Collector.toSet() is declared UNORDERED, so we can disturb the encounter > AS> order without viola

Re: Collectors.toSet() small performance improvement

2016-08-09 Thread Tagir F. Valeev
Hello, Aleksey! Thank you for review. AS> Good trick, but does it work properly with the sets that care about the AS> add order, e.g. LinkedHashSet? I guess our saving grace here is AS> Collector.toSet() is declared UNORDERED, so we can disturb the encounter AS> order without violating the API co

Re: Collectors.toSet() small performance improvement

2016-08-09 Thread Aleksey Shipilev
On 08/09/2016 08:31 AM, Tagir F. Valeev wrote: > --- a/src/java.base/share/classes/java/util/stream/Collectors.java Tue > Aug 02 07:19:06 2016 +0530 > +++ b/src/java.base/share/classes/java/util/stream/Collectors.java Tue > Aug 09 11:47:20 2016 +0700 > @@ -295,7 +295,12 @@ > public

Collectors.toSet() small performance improvement

2016-08-08 Thread Tagir F. Valeev
Hello! I'd like to propose a simple performance patch for Collectors.toSet(): --- a/src/java.base/share/classes/java/util/stream/Collectors.java Tue Aug 02 07:19:06 2016 +0530 +++ b/src/java.base/share/classes/java/util/stream/Collectors.java Tue Aug 09 11:47:20 2016 +0700 @@ -295,7 +