Integrated: 8336856: Efficient hidden class-based string concatenation strategy

Shaojin Wen duke at openjdk.org
Fri Aug 16 13:23:03 UTC 2024


On Sun, 21 Jul 2024 12:25:36 GMT, Shaojin Wen <duke at openjdk.org> wrote:

> 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 @cl4es 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 pull request has now been integrated.

Changeset: 5022109b
Author:    Shaojin Wen <shaojin.wensj at alibaba-inc.com>
Committer: Claes Redestad <redestad at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/5022109b2a33a8cf2608eb829098b27641b731a4
Stats:     1345 lines in 8 files changed: 1212 ins; 29 del; 104 mod

8336856: Efficient hidden class-based string concatenation strategy

Co-authored-by: Claes Redestad <redestad at openjdk.org>
Reviewed-by: redestad, liach

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

PR: https://git.openjdk.org/jdk/pull/20273


More information about the core-libs-dev mailing list