RFR: 8352075: Perf regression accessing fields [v28]

Coleen Phillimore coleenp at openjdk.org
Tue Jun 10 13:04:40 UTC 2025


On Tue, 10 Jun 2025 08:44:05 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

>> Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Revert removing FieldInfoReader::next_uint()
>
> src/hotspot/share/utilities/packedTable.hpp line 56:
> 
>> 54:     // Packed table does NOT support duplicate keys.
>> 55:     virtual bool next(uint32_t* key, uint32_t* value) = 0;
>> 56:   };
> 
> Does it make sense to take the cost of an indirect call for each kv pair? You can't inline it, so the stack frame needs to be popped and pushed, and you're taking 2 registers (16 bytes) to give 8 bytes and 1 bit of information.
> 
>  We can amortize the cost by implementing this signature instead:
> 
> 
> virtual uint32_t next(Pair<uint32_t, uint32_t>* kvs, uint32_t kvs_size);

This was done this way with a "Supplier" because this package would be useful for other Unsigned5 packed types.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24847#discussion_r2137846594


More information about the hotspot-dev mailing list