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 [v4]

2022-10-18 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 with a new target base due to a merge or a rebase. The incremental we

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

2022-10-18 Thread Andrey Turbanov
On Mon, 17 Oct 2022 21:48:42 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 with a new ta

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

2022-10-18 Thread Mandy Chung
On Tue, 18 Oct 2022 05:21:47 GMT, Ioi Lam wrote: >> src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java >> line 346: >> >>> 344: >>> 345: /** >>> 346: * Returns an object to pass this.classData to the method >>> of the >> >> What about: >> >> Suggestion: >>

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

2022-10-17 Thread Ioi Lam
On Tue, 18 Oct 2022 02:03:06 GMT, Mandy Chung wrote: >> 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

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

2022-10-17 Thread Mandy Chung
On Mon, 17 Oct 2022 21:48:42 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 with a new ta

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 [v3]

2022-10-17 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 with a new target base due to a merge or a rebase. The incremental we

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:

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

2022-10-13 Thread Vladimir Ivanov
On Thu, 13 Oct 2022 21:53:47 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. src/java.base/share/classes/java/lang/invoke/InvokerByte