On Thu, 30 Mar 2023 20:06:02 GMT, Chen Liang <li...@openjdk.org> wrote:
> This patch optimizes ClassDesc.resolveConstantDesc for array classes. > Otherwise, the performance of reference class resolution remain unchanged. > > A benchmark comparing resolution for reference arrays, primitive arrays, and > class or interfaces is included in this patch, and the result comparison on > my machine is available at > https://jmh.morethan.io/?gists=21c462f4879f6166b3308a41c092d51e,1aeae6ff40a129f89dbfedcb874cfd37 Done. Now the benchmark explicitly measures the 3 reference types, with new result in line with previous observations here: https://jmh.morethan.io/?gists=21c462f4879f6166b3308a41c092d51e,1aeae6ff40a129f89dbfedcb874cfd37 The `isPrimitiveArray` check is converted to a private method in `ReferenceClassDesc` as it applies only to reference type descriptor strings. Also included the rationale for not checking initial `[` in a comment. ------------- PR Comment: https://git.openjdk.org/jdk/pull/13252#issuecomment-1491196749