Re: RFR: 8333265: De-duplicate method references in java.util.stream.FindOps [v3]

2024-08-21 Thread Chen Liang
On Tue, 18 Jun 2024 10:00:46 GMT, Claes Redestad wrote: >> Extracting duplicate method references to static field reduce proxy class >> spinning and loading. In this case 2 less classes loaded when using >> `findAny()` on each type of stream. > > Claes Redestad has updated the pull request incr

Re: RFR: 8333265: De-duplicate method references in java.util.stream.FindOps [v3]

2024-08-21 Thread Chen Liang
On Wed, 21 Aug 2024 22:04:02 GMT, Claes Redestad wrote: >> @cl4es Just wonder what your use case is for this addition. If this is >> accidentally committed, please remove it and I am glad with all other >> changes. > > Adding a `main` method in micros like these allow me to easily multi-purpose

Re: RFR: 8333265: De-duplicate method references in java.util.stream.FindOps [v3]

2024-08-21 Thread Claes Redestad
On Wed, 21 Aug 2024 21:46:15 GMT, Chen Liang wrote: >> test/micro/org/openjdk/bench/java/util/stream/ops/ref/FindAny.java line 63: >> >>> 61: } >>> 62: >>> 63: public static void main(String... args) { >> >> Is this driver necessary? > > @cl4es Just wonder what your use case is for thi

Re: RFR: 8333265: De-duplicate method references in java.util.stream.FindOps [v3]

2024-08-21 Thread Chen Liang
On Wed, 24 Jul 2024 14:24:40 GMT, Chen Liang wrote: >> Claes Redestad has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fixes > > test/micro/org/openjdk/bench/java/util/stream/ops/ref/FindAny.java line 63: > >> 61: } >> 62: >> 63:

Re: RFR: 8333265: De-duplicate method references in java.util.stream.FindOps [v3]

2024-07-24 Thread Chen Liang
On Tue, 18 Jun 2024 10:00:46 GMT, Claes Redestad wrote: >> Extracting duplicate method references to static field reduce proxy class >> spinning and loading. In this case 2 less classes loaded when using >> `findAny()` on each type of stream. > > Claes Redestad has updated the pull request incr

Re: RFR: 8333265: De-duplicate method references in java.util.stream.FindOps [v3]

2024-06-26 Thread Claes Redestad
On Tue, 18 Jun 2024 10:00:46 GMT, Claes Redestad wrote: >> Extracting duplicate method references to static field reduce proxy class >> spinning and loading. In this case 2 less classes loaded when using >> `findAny()` on each type of stream. > > Claes Redestad has updated the pull request incr

Re: RFR: 8333265: De-duplicate method references in java.util.stream.FindOps [v3]

2024-06-18 Thread Claes Redestad
> Extracting duplicate method references to static field reduce proxy class > spinning and loading. In this case 2 less classes loaded when using > `findAny()` on each type of stream. Claes Redestad has updated the pull request incrementally with one additional commit since the last revision:

Re: RFR: 8333265: De-duplicate method references in java.util.stream.FindOps [v2]

2024-06-18 Thread Claes Redestad
> Extracting duplicate method references to static field reduce proxy class > spinning and loading. In this case 2 less classes loaded when using > `findAny()` on each type of stream. Claes Redestad has updated the pull request incrementally with one additional commit since the last revision:

Re: RFR: 8333265: De-duplicate method references in java.util.stream.FindOps

2024-06-06 Thread ExE Boss
On Thu, 30 May 2024 12:50:36 GMT, Claes Redestad wrote: > Extracting duplicate method references to static field reduce proxy class > spinning and loading. In this case 2 less classes loaded when using > `findAny()` on each type of stream. The intermediate `Predicate`s and `Supplier`s don’t ne

Re: RFR: 8333265: De-duplicate method references in java.util.stream.FindOps

2024-05-30 Thread Claes Redestad
On Thu, 30 May 2024 12:50:36 GMT, Claes Redestad wrote: > Extracting duplicate method references to static field reduce proxy class > spinning and loading. In this case 2 less classes loaded when using > `findAny()` on each type of stream. Vicente filed a bug on javac to investigate this: htt

Re: RFR: 8333265: De-duplicate method references in java.util.stream.FindOps

2024-05-30 Thread Rémi Forax
On Thu, 30 May 2024 12:50:36 GMT, Claes Redestad wrote: > Extracting duplicate method references to static field reduce proxy class > spinning and loading. In this case 2 less classes loaded when using > `findAny()` on each type of stream. For constant method reference, the solution is to use

Re: RFR: 8333265: De-duplicate method references in java.util.stream.FindOps

2024-05-30 Thread Chen Liang
On Thu, 30 May 2024 12:50:36 GMT, Claes Redestad wrote: > Extracting duplicate method references to static field reduce proxy class > spinning and loading. In this case 2 less classes loaded when using > `findAny()` on each type of stream. Marked as reviewed by liach (Author). Indeed, CallSit

Re: RFR: 8333265: De-duplicate method references in java.util.stream.FindOps

2024-05-30 Thread Claes Redestad
On Thu, 30 May 2024 13:04:46 GMT, Chen Liang wrote: > Should we extract them to private static utility methods for potential > laziness support in the future? Ideally we shouldn't have to do any of this. I thought such method references were already de-duplicated in javac - at least within the

Re: RFR: 8333265: De-duplicate method references in java.util.stream.FindOps

2024-05-30 Thread Chen Liang
On Thu, 30 May 2024 12:50:36 GMT, Claes Redestad wrote: > Extracting duplicate method references to static field reduce proxy class > spinning and loading. In this case 2 less classes loaded when using > `findAny()` on each type of stream. Should we extract them to private static utility metho