RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

Adam Sotona asotona at openjdk.org
Fri Apr 28 06:14:55 UTC 2023


On Thu, 27 Apr 2023 18:49:03 GMT, Brian Goetz <briangoetz at openjdk.org> wrote:

> With the upcoming refactor to make parse/build instance methods, there is a logical place and lifetime for caches.
> […](#)

@briangoetz 
This is a different level of caches than the discussed ClassHierarchyResolver cache. 

Most of the class generation code starts with static ClassDesc constants (or references to ConstantDescs).
Internal caching of class internal name within each single ClassDesc (instead of repeated sub-stringing by an external utility method) has visible performance impact. From each of the static ClassDesc instances there are thousands of calls of their conversions to internal class names and the conversion always create a new sub-string instance. 
I don't agree with closing this PR, its function is complementary to the other performance improvements.

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

PR Comment: https://git.openjdk.org/jdk/pull/13598#issuecomment-1527028304


More information about the core-libs-dev mailing list