Condy for LambdaMetafactory?

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Mon Oct 23 10:21:18 UTC 2023


On 21/10/2023 19:59, John Rose wrote:
> All I’m saying here is that sharing is not always a win. Sometimes the 
> opposite move, splitting and customization, is the performance win, 
> even though you have two copies of the code in the end. 

Something related to this topic, if we revisit this: currently javac 
deduplicates lambda bodies that are identical [1], so that only one BSM 
entry is generated (and then reused).

The logic for doing that is a bit finicky, and it seems to go against 
the principle you outline above John. So, as we shift towards constant 
lambdas, perhaps there's a chance to look at this again.

Cheers
Maurizio

[1] - https://bugs.openjdk.org/browse/JDK-8200301



More information about the amber-dev mailing list