RFR: 8339320: Optimize ClassFile Utf8EntryImpl#inflate
ExE Boss
duke at openjdk.org
Fri Aug 30 12:30:46 UTC 2024
On Thu, 29 Aug 2024 11:44:50 GMT, Shaojin Wen <swen at openjdk.org> wrote:
> A very small optimization, split the large method inflate, split the infrequently used paths into a method inflateCHAR
Typo (`HCAR` → `CHAR`):
src/java.base/share/classes/jdk/internal/classfile/impl/AbstractPoolEntry.java line 235:
> 233: state = State.BYTE;
> 234: } else {
> 235: inflateHCAR(singleBytes, hash);
Suggestion:
inflateCHAR(singleBytes, hash);
src/java.base/share/classes/jdk/internal/classfile/impl/AbstractPoolEntry.java line 239:
> 237: }
> 238:
> 239: private void inflateHCAR(int singleBytes, int hash) {
Suggestion:
private void inflateCHAR(int singleBytes, int hash) {
-------------
PR Review: https://git.openjdk.org/jdk/pull/20767#pullrequestreview-2270677504
PR Review Comment: https://git.openjdk.org/jdk/pull/20767#discussion_r1737542852
PR Review Comment: https://git.openjdk.org/jdk/pull/20767#discussion_r1737543008
More information about the core-libs-dev
mailing list