RFR: 8338532: Speed up the ClassFile API MethodTypeDesc#ofDescriptor

Shaojin Wen duke at openjdk.org
Mon Aug 19 06:32:24 UTC 2024


On Mon, 19 Aug 2024 02:04:19 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Also `Double` `Module` `Number` `Record` `Thread` `System` are susceptible to taking more time in `regionMatches`.
>
> I think you can have the current patch RFR (ready for review) without this deduplication given my concerns. We can add deduplication of frequent descriptors in another patch after confirming it is a net positive.

regionMatches uses vectorizedMismatch for comparison. The length of `Ljava/lang/Object;` is 18. In the code without intrinsic, it will exit after two long comparisons. If there is vector128 optimization, it will exit after one comparison, and the overhead is very small.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20611#discussion_r1721192307


More information about the core-libs-dev mailing list