Details
-
Enhancement
-
Resolution: Fixed
-
P3
-
24
-
b12
Description
The current strategy for bootstrapping JEP 280 String concat expressions uses either an optimized MH expression tree, or, due to scalability issues with that implementation, a per call-site StringBuilder-based class generation scheme.
This RFE seeks to unify these into a single strategy that uses per-shape class generation emitting code semantically similar to the optimized MH expression tree. Using hidden classes installed into java.lang with access to the StringConcatHelper set of utility methods this can achieve similar throughput performance, while reducing the number of generated classes at high arities, reducing startup overheads, and improving warmup characteristics.
This RFE was initially prompted by a suggestion of [~redestad] in the discussion of PR #20253 (https://github.com/openjdk/jdk/pull/20253#issuecomment-2240412866), and then evolved after collaborating on this issue into this full re-implementation.
This RFE seeks to unify these into a single strategy that uses per-shape class generation emitting code semantically similar to the optimized MH expression tree. Using hidden classes installed into java.lang with access to the StringConcatHelper set of utility methods this can achieve similar throughput performance, while reducing the number of generated classes at high arities, reducing startup overheads, and improving warmup characteristics.
This RFE was initially prompted by a suggestion of [~redestad] in the discussion of PR #20253 (https://github.com/openjdk/jdk/pull/20253#issuecomment-2240412866), and then evolved after collaborating on this issue into this full re-implementation.
Attachments
Issue Links
- relates to
-
JDK-8327247 C2 uses up to 2GB of RAM to compile complex string concat in extreme cases
- Resolved
-
JDK-8085796 JEP 280: Indify String Concatenation
- Closed
-
JDK-8339166 java/lang/String/concat/HiddenClassUnloading.java fails on AIX and Linux ppc64le after JDK-8336856
- Resolved
-
JDK-8338930 StringConcatFactory hardCoded string concatenation strategy
- Resolved
- links to
-
Commit(master) openjdk/jdk/5022109b
-
Review(master) openjdk/jdk/20273
(1 links to)