On Fri, 14 Oct 2022 04:37:22 GMT, Ioi Lam <[email protected]> wrote:
>> Please review this small optimization. As shown in the JBS issue, most of
>> the generated LambdaForm classes have a single ClassData, so we can get a
>> small footprint/speed improvement.
>
> Ioi Lam has updated the pull request incrementally with one additional commit
> since the last revision:
>
> @iwanowww comments
src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java line
291:
> 289: final List<ClassData> cd = classData;
> 290: return switch(cd.size()) {
> 291: case 0 -> null;
`List.of()` always returns the same singleton instance and does not cause any
object allocation. I prefer to keep the `classDataValues()` to return
`List<Object>`
-------------
PR: https://git.openjdk.org/jdk/pull/10706