On Thu, 9 Jun 2022 16:04:43 GMT, Claes Redestad <[email protected]> wrote:
>> To take optimal advantage of the pre-existing optimization for repeated >> filters we could split the application of different types of stringifiers. >> >> The resulting difference in order of evaluation is not observable by >> conventional means since all reference type share the same object >> stringifier, and the others are filtering primitives (floats and doubles) >> which have been passed by value already. >> >> This change neutral on many concatenation expression shapes, but for any >> complex expressions with interleaving float/double and reference parameters >> it brings a straightforward reduction in rebinds and underlying LFs >> generated. For example on the >> [MixedStringCombinations.java](https://urldefense.com/v3/__https://gist.github.com/cl4es/08fb581dece3a73e89bfa52337bc4248__;!!ACWV5N9M2RV99hQ!M-YXLABYjfVMR7dBszho0HABOJ5jyVMSig_m31rczmDi7Tv9eBksPRG4m9-qzQFEw4LLqVdJJi8b1j052rDHdfoCWw$ >> ) test there's a modest 2% reduction in total classes loaded with this >> change (from 16209 to 15872) > > Claes Redestad has updated the pull request incrementally with one additional > commit since the last revision: > > Improve comments based on review feedback Thanks for reviews. I've filed [JDK-8288738](https://bugs.openjdk.org/browse/JDK-8288738) to explore adding a generalized `LambdaForm` class which would minimize the number of bound arguments and generated classes. I think the changes here are easy enough to back out as part of exploring that route, so I'll go ahead and integrate this enhancement for now. ------------- PR: https://git.openjdk.org/jdk/pull/9082
