[Bug c++/83309] Structure elements have O(n^2) compile time slowdown

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Mar 31 16:04:33 GMT 2025


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83309

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Jason Merrill from comment #6)
> We could use one of the other lang_type fields for a hash table until the
> class is complete, perhaps vcall_indices.

Indeed.  We'd need to use a union for that and tell GTY how to find out which
one is used.

> Or change 'members' from a vec to a hash table.

I'd think that vec is just fine for the common case, most people don't have
hundreds of members in classes.  I can definitely gather statistics.


More information about the Gcc-bugs mailing list