RFR: 8338546: Speed up ConstantPoolBuilder::classEntry(ClassDesc) [v3]

Chen Liang liach at openjdk.org
Thu Sep 19 18:04:38 UTC 2024


On Tue, 17 Sep 2024 02:04:51 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Speed up `ConstantPoolBuilder::classEntry(ClassDesc)` by going through `ClassDesc` comparison and reusing descriptor hash to calculate internal name hash if possible. No suitable device to run benchmarks so need to find something to run the new benchmark to ensure things work as intended.
>
> Chen Liang has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 15 commits:
> 
>  - Fix build
>  - Merge branch 'master' of https://github.com/openjdk/jdk into feature/classentry-speedup
>  - Buggy 2nd attempt - crashes hotspot
>  - Merge branch 'master' of https://github.com/openjdk/jdk into feature/classentry-speedup
>  - Merge branch 'master' of https://github.com/openjdk/jdk into feature/classentry-speedup
>  - More conflicts
>  - Merge branch 'master' of https://github.com/openjdk/jdk into feature/classentry-speedup
>  - Merge branch 'master' of https://github.com/openjdk/jdk into feature/classentry-speedup
>  - Merge branch 'master' of https://github.com/openjdk/jdk into feature/classentry-speedup
>  - Another bug in benchmark
>  - ... and 5 more: https://git.openjdk.org/jdk/compare/996790c7...6117a5bd

Benchmark                                                       Mode  Cnt     Score     Error   Units      Score     Error   Units
ConstantPoolBuildingClassEntry.freshCreationWithDescs          thrpt    5   340.391  ±   0.607  ops/ms   351.801  ±   5.991  ops/ms
ConstantPoolBuildingClassEntry.freshCreationWithInternalNames  thrpt    5   408.762  ±   5.699  ops/ms   397.367  ±   1.516  ops/ms
ConstantPoolBuildingClassEntry.identicalLookup                 thrpt    5   641.875  ±   7.192  ops/ms  2202.179  ± 464.878  ops/ms
ConstantPoolBuildingClassEntry.internalNameLookup              thrpt    5  2054.220  ± 237.406  ops/ms  1476.090  ±  33.318  ops/ms
ConstantPoolBuildingClassEntry.nonIdenticalLookup              thrpt    5   645.414  ±  14.929  ops/ms  1811.743  ±  83.868  ops/ms
ConstantPoolBuildingClassEntry.oldStyleLookup                  thrpt    5   651.489  ±  10.941  ops/ms   529.306  ±   4.414  ops/ms


Latest benchmark results.

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

PR Comment: https://git.openjdk.org/jdk/pull/20667#issuecomment-2361845713


More information about the core-libs-dev mailing list