On Mon, 22 Jul 2024 15:03:12 GMT, Andrew Haley <a...@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