On Mon, 5 May 2025 15:00:04 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:

>> Radim Vansa has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Move constant to static final var
>
> Also should probably add your test to test/micro/org/openjdk/bench as a JMH

@coleenp I wouldn't mind keeping the order in InstanceKlass (or elsewhere), but 
it would increase memory usage - and through this go against the idea from 
https://bugs.openjdk.org/browse/JDK-8292818 that tries to reduce the memory 
footprint. Would that be acceptable?
If methods are already sorted alphabetically, it would make sense for fields, 
too.

> I'm wondering if instead this patch could create a cache of the 
> FieldInfoStream in InstanceKlass for certain heuristics.

If we'd have something like a complete n-ary tree or hashtable, it would most 
likely take several bytes per field. I am not sure how much memory can I 
sacrifice... Even if we can have the structure only for 'big' classes.

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

PR Comment: https://git.openjdk.org/jdk/pull/24847#issuecomment-2851974225

Reply via email to