RFR: 8331744: java.lang.classfile.TypeKind improvements [v4]
Chen Liang
liach at openjdk.org
Thu May 9 12:09:54 UTC 2024
On Thu, 9 May 2024 07:23:16 GMT, Adam Sotona <asotona at openjdk.org> wrote:
>> Chen Liang has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Hash table, use fixed random seed
>
> src/java.base/share/classes/java/lang/classfile/TypeKind.java line 139:
>
>> 137: case 'V' -> TypeKind.VoidType;
>> 138: default -> throw new IllegalArgumentException("Bad type: " + s);
>> 139: };
>
> This maps to a `tableswitch`, could you explain why a statically initialized array addressed with a custom hash code suppose to be faster?
> Thanks.
I actually am not sure of the reason; it is indeed a tableswitch in bytecode. @cl4es might know it better?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19109#discussion_r1595360109
More information about the core-libs-dev
mailing list