https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114563
Bug ID: 114563 Summary: ggc_internal_alloc is slow Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- We seem to have a single bucket of free objects we walk: /* Check the list of free pages for one we can use. */ for (pp = &G.free_pages, p = *pp; p; pp = &p->next, p = *pp) if (p->bytes == entry_size) break; and if that list becomes large this is a very bad bottleneck.