RFR: 8331341: secondary_super_cache does not scale well: C1 and interpreter [v3]
Andrew Haley
aph at openjdk.org
Mon Jul 22 16:39:33 UTC 2024
On Mon, 22 Jul 2024 15:03:12 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> Alternatively, `Klass::is_subtype_of()` can unconditionally perform linear search over secondary_supers array.
>>
>> Even though I very much like to see table lookup written in C++ (accompanying heavily optimized platform-specific MacroAssembler variants), it would make C++ runtime even simpler.
>
>> Alternatively, `Klass::is_subtype_of()` can unconditionally perform linear search over secondary_supers array.
>>
>> Even though I very much like to see table lookup written in C++ (accompanying heavily optimized platform-specific MacroAssembler variants), it would make C++ runtime even simpler.
>
> It would, but there is something to be said for being able to provide a fast "no" answer for interface membership. I'll agree it's probably not a huge difference. I guess `is_cloneable_fast()` exists only because searching the interfaces is slow.
> Also, if table lookup is written in C++ but not used, it will rot.
> Also also, `Klass::is_subtype_of()` is used for C1 runtime.
Thinking about it some more, I don't really mind. There may be some virtue to moving lookup_secondary_supers_table() to a comment in the back end(s), and the expansion of population_count() is rather bloaty.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19989#discussion_r1686835253
More information about the core-libs-dev
mailing list