Re: RFR: 8295302: Do not use ArrayList when LambdaForm has a single ClassData [v2]

2022-10-19 Thread Ioi Lam
On Mon, 17 Oct 2022 19:28:09 GMT, Claes Redestad wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @iwanowww comments > > Looks good, assuming there are tests calling in with no class data to check > that `defineClass` i

Re: RFR: 8295302: Do not use ArrayList when LambdaForm has a single ClassData [v2]

2022-10-17 Thread Ioi Lam
On Fri, 14 Oct 2022 17:12:51 GMT, Mandy Chung wrote: >> src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java >> line 291: >> >>> 289: final List cd = classData; >>> 290: return switch(cd.size()) { >>> 291: case 0 -> null; >> >> `List.of()` alwa

Re: RFR: 8295302: Do not use ArrayList when LambdaForm has a single ClassData [v2]

2022-10-17 Thread Ioi Lam
On Mon, 17 Oct 2022 19:28:09 GMT, Claes Redestad wrote: > Looks good, assuming there are tests calling in with no class data to check > that `defineClass` is fine with `null` inputs? Yes, we have two existing test cases that has no class data: - java/lang/invoke/CompileThresholdBootstrapTest -

Re: RFR: 8295302: Do not use ArrayList when LambdaForm has a single ClassData [v2]

2022-10-17 Thread Claes Redestad
On Fri, 14 Oct 2022 04:37:22 GMT, Ioi Lam 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

Re: RFR: 8295302: Do not use ArrayList when LambdaForm has a single ClassData [v2]

2022-10-14 Thread Mandy Chung
On Fri, 14 Oct 2022 16:57:47 GMT, Mandy Chung wrote: >> 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:

Re: RFR: 8295302: Do not use ArrayList when LambdaForm has a single ClassData [v2]

2022-10-14 Thread Mandy Chung
On Fri, 14 Oct 2022 04:37:22 GMT, Ioi Lam 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

Re: RFR: 8295302: Do not use ArrayList when LambdaForm has a single ClassData [v2]

2022-10-13 Thread Vladimir Ivanov
On Fri, 14 Oct 2022 04:37:22 GMT, Ioi Lam 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

Re: RFR: 8295302: Do not use ArrayList when LambdaForm has a single ClassData [v2]

2022-10-13 Thread Ioi Lam
On Thu, 13 Oct 2022 22:29:03 GMT, Vladimir Ivanov wrote: >> 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 321: > >> 319:

Re: RFR: 8295302: Do not use ArrayList when LambdaForm has a single ClassData [v2]

2022-10-13 Thread Ioi Lam
> 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: