RFR: 8318457: Use prefix-less prepend methods directly to reduce branches in String concat expressions [v3]

Claes Redestad redestad at openjdk.org
Fri Oct 20 11:22:31 UTC 2023


On Thu, 19 Oct 2023 15:59:54 GMT, Claes Redestad <redestad at openjdk.org> wrote:

>> In #16006 using `StringConcatFactory` seem to induce a run-to-run variance. One idea to reduce this is to generate expression trees with fewer branches by looking up and using the prefix-less `prepend` methods directly for cases where constant is null/empty so that the prefixed prepender will always deal with a non-null prefix constant.
>
> Claes Redestad has updated the pull request incrementally with one additional commit since the last revision:
> 
>   drop dropLookupMode

I think we try to avoid having any additional logic in the `JavaLangAccess` type proxies. Either way I think this is getting out of scope for this PR and if there's a real need to lock down the mechanism it can be done in a follow-up. Do you agree?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/16244#issuecomment-1772555820


More information about the core-libs-dev mailing list