On Sun, 21 Jul 2024 12:25:36 GMT, Shaojin Wen <d...@openjdk.org> wrote:
> The current implementation of StringConcat is to mix the coder and length > into a long. This operation will have some overhead for int/long/boolean > types. We can separate the calculation of the coder from the calculation of > the length, which can improve the performance in the scenario of concat > int/long/boolean. > > This idea comes from the suggestion of @l4es in the discussion of PR > https://github.com/openjdk/jdk/pull/20253#issuecomment-2240412866 For the question [here](https://github.com/openjdk/jdk/pull/20253#issuecomment-2242267516): 1. A sample of loading an otherwise inaccessible method handle from class data: https://github.com/openjdk/jdk/blob/c3226aaeb810521257e961be5763552c86ee5651/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java#L517-L518 2. In offline discussion with Claes, we are thinking of generating direct bytecode to avoid the overhead of creating a lot of intermediate method handles. ------------- PR Comment: https://git.openjdk.org/jdk/pull/20273#issuecomment-2243101199