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

Claes Redestad redestad at openjdk.org
Thu May 30 14:33:01 UTC 2024


On Thu, 30 May 2024 12:50:36 GMT, Claes Redestad <redestad at openjdk.org> 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: https://bugs.openjdk.org/browse/JDK-8333278

I wouldn't mind using condy for constant aka non-capturing lambdas. I recall we had a prototype for that years ago, but switching over was shelved for some reason.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/19477#issuecomment-2139703977


More information about the core-libs-dev mailing list