RFR: 8338930: StringConcatFactory hardCoded string concatenation strategy

Shaojin Wen duke at openjdk.org
Sun Aug 25 12:16:02 UTC 2024


On Sun, 25 Aug 2024 11:25:11 GMT, Claes Redestad <redestad at openjdk.org> wrote:

> * Can we try to optimize the default generation shape further before we reach for this sort of specialization?

I am also thinking about this, such as the optimization of Integer/Long type parameters. Is this what you are talking about?

> * How well-motivated is it to increase complexity to optimize huge expressions, which can be assumed to be rare and less likely to be part of the critical path?

I agree with you that this is rare, but one thing to consider is that we don't want the new implementation to degrade in these scenarios.

> * If we do this I think we need to have a separate control flag than `inlineThreshold`

I also considered this, for example the new control flag could be named `reuseThreshold`


> * Trivial optimizations such as passing `true` to `methodType` and using `MethodTypeDescImpl.ofValidated` could be split out to a separate PR to keep this patch cleaner and easier to review/discuss.

You are right, I have created a separate PR https://github.com/openjdk/jdk/pull/20704

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

PR Comment: https://git.openjdk.org/jdk/pull/20675#issuecomment-2308807925


More information about the core-libs-dev mailing list