[RFC] Improve Dwarf 5 .debug_names Type Lookup/Parsing Speed

Therefore, DW_IDX_parent should point to a pool entry (the second type), not a name table entry.

Yup, this makes sense. But consider this example, where we are looking for A::B and do the following queries:

  1. Query the table for B, let’s say it gives us a single result, and its DW_IDX= pool_entry_B_parent (a pool entry).
  2. Query the table for A, let’s say it gives us two results: pool_entry_A1 and pool_entry_A2. If either pool_entry_A1 == pool_entry_B_parent or pool_entry_A2 == pool_entry_B_parent, we know that pool_entry_B_parent has the name A.

This precludes the need for parent name information. Does that make sense?

To add more complexity, the parent pool entry can be nameless

Would that be a concern for us though? Whenever we are doing type lookup, we have names for everything (A::B::C). If we found something on the accelerator table without a parent – or a nameless parent – we know this is not the entry we are looking for, no?

, I think the bigger problem of template / simple / canonical names remain

Even if we resolve the parent name issue, I still don’t see how we get around the template names problem, either with IDX_parent or IDX_type_hash. Did you have a plan for those?