Re: RFR: 8338930: StringConcatFactory hardCoded string concatenation strategy [v6]

2024-09-05 Thread Shaojin Wen
On Fri, 6 Sep 2024 01:01:11 GMT, Chen Liang wrote: >> Do I need to declare it as ACC_INTERFACE? Many utility classes do this. > > interface has extra restrictions that can fail class validation, such as > fields must be public static final. So I recommend just using abstract class. Thanks, I le

Re: RFR: 8338930: StringConcatFactory hardCoded string concatenation strategy [v6]

2024-09-05 Thread Chen Liang
On Fri, 6 Sep 2024 00:45:14 GMT, Shaojin Wen wrote: >> src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java line >> 1288: >> >>> 1286: if (staticConcat) { >>> 1287: clb.withSuperclass(CD_Object) >>> 1288:

Re: RFR: 8338930: StringConcatFactory hardCoded string concatenation strategy [v6]

2024-09-05 Thread Shaojin Wen
On Thu, 5 Sep 2024 23:37:30 GMT, Chen Liang wrote: >> Shaojin Wen has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 12 commits: >> >> - Merge remote-tracking branch 'upstream/master' into >> optim_concat_factory_202408 >> >>

Re: RFR: 8338930: StringConcatFactory hardCoded string concatenation strategy [v6]

2024-09-05 Thread Chen Liang
On Thu, 5 Sep 2024 23:22:01 GMT, Shaojin Wen wrote: >> This is a follow-up to PR #20273, which improves performance when the number >> of parameters exceeds 20. >> >> When the number of parameters is large, the possibility of reuse will be >> lower, so we can use the static concat method and w

Re: RFR: 8338930: StringConcatFactory hardCoded string concatenation strategy [v6]

2024-09-05 Thread Shaojin Wen
> This is a follow-up to PR #20273, which improves performance when the number > of parameters exceeds 20. > > When the number of parameters is large, the possibility of reuse will be > lower, so we can use the static concat method and write the length and coder > directly into the bytecode to