-
Sub-task
-
Resolution: Fixed
-
P4
-
24
-
None
ConstantPoolBuilder.classEntry(ClassDesc) is having some troubles with ClassDesc: it currently computes a substring and finds the utf8, which involves a new allocation and hash calculation for both hits and misses. Both cases can be optimized.
Hit improvements:
1. Use new hashing scheme for ClassEntry so it can be derived from a ClassDesc. Fast return if ClassDesc matches. (This relies on the == fast path in ClassDesc to avoid array scans, assuming we share ClassDesc objects)
Miss improvements:
1. Derive utf8 hash from ClassDesc to avoid recomputation when looking up or putting into CP table
2. Avoid substringing until we confirm there's no matching utf8
Need to check the results to ensure there's no extra hashing or array scanning done as a regression from these improvements.
Hit improvements:
1. Use new hashing scheme for ClassEntry so it can be derived from a ClassDesc. Fast return if ClassDesc matches. (This relies on the == fast path in ClassDesc to avoid array scans, assuming we share ClassDesc objects)
Miss improvements:
1. Derive utf8 hash from ClassDesc to avoid recomputation when looking up or putting into CP table
2. Avoid substringing until we confirm there's no matching utf8
Need to check the results to ensure there's no extra hashing or array scanning done as a regression from these improvements.
- links to
-
Commit(master) openjdk/jdk/caa751c5
-
Review(master) openjdk/jdk/20667