RFR: 8338936: StringConcatFactory optimize the construction of MethodType and MethodTypeDesc
Claes Redestad
redestad at openjdk.org
Sun Aug 25 13:40:03 UTC 2024
On Sun, 25 Aug 2024 13:22:04 GMT, Claes Redestad <redestad at openjdk.org> wrote:
>> If initCoder is UTF16, the coder method does not need to be generated. This is an optimization and may be a separate PR. Of course, if you agree, I can also put it here.
>
> Right, if `initCoder` is always UTF16 (`-XX:-CompactStrings`) then we never need the `coder` method. Nor really if any of the constants have UTF-16 chars, but in those cases it might be more appropriate to inject the derived value and have a runtime test - as long as it get optimized away. Otherwise we might need to generate two different classes per shape.
If we're to pre-generate code for concats when linking JDK images (something that might be a big help for startup) then it'd be nice to be agnostic regarding `CompactStrings`
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20704#discussion_r1730352516
More information about the core-libs-dev
mailing list