RFR: 8295302: Do not use ArrayList when LambdaForm has a single ClassData [v3]
Andrey Turbanov
aturbanov at openjdk.org
Tue Oct 18 20:17:04 UTC 2022
On Mon, 17 Oct 2022 21:48:42 GMT, Ioi Lam <iklam at openjdk.org> 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
>
> - Merge branch 'master' into 8295302-no-arraylist-for-single-classdata-for-lambdaform
> - @mlchung comments
> - @iwanowww comments
> - 8295302: Do not use ArrayList when LambdaForm has a single ClassData
src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java line 352:
> 350: private Object classDataValues() {
> 351: final List<ClassData> cd = classData;
> 352: return switch(cd.size()) {
Suggestion:
return switch (cd.size()) {
-------------
PR: https://git.openjdk.org/jdk/pull/10706
More information about the core-libs-dev
mailing list