On Thu, 22 Aug 2024 11:54:48 GMT, Claes Redestad <redes...@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.
>
> test/micro/org/openjdk/bench/jdk/classfile/ConstantPoolBuildingClassEntry.java
>  line 64:
> 
>> 62:         builder = ConstantPoolBuilder.of();
>> 63:         classDescs = List.of(
>> 64:                 CD_Byte, CD_Object, CD_Long.arrayType(), CD_String, 
>> CD_String, CD_Object, CD_Short,
> 
> Should this include some primitive class descs? I only see wrapper types like 
> `CD_Integer`

Unfortunately primitive types aren't encoded by class entries, but accessed by 
getstatic on Wrapper's TYPE field.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20667#discussion_r1726996341

Reply via email to