On Thu, 22 Aug 2024 13:45:31 GMT, Claes Redestad <redes...@openjdk.org> wrote:
>> Chen Liang has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains five commits: >> >> - Improve benchmark as suggested >> - Merge branch 'master' of https://github.com/openjdk/jdk into >> feature/classentry-speedup >> - Fix microbenchmark >> - Improve jmh >> - 8338546: Speed up ConstantPoolBuilder::classEntry(ClassDesc) > > src/java.base/share/classes/jdk/internal/classfile/impl/Util.java line 372: > >> 370: * } >> 371: * } >> 372: * This is converted to explicit initialization to avoid bootstrap >> overhead. > > Have you measured this to be true and useful? Static array initializers are > bulky at a bytecode level so sometimes just generating on the fly carries > insignicant overhead. Then the `UtilTest` assertion test wouldn't really be > needed. I measured in bytestacks and the clinit instructions reduced by about 2/3 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20667#discussion_r1760046569