util/ra: Bump the initial size of adjacency lists

For Intel, looking at a few fossils, the majority of nodes
have more than 32 entries in the list.  I'd expect other backends
to have similar numbers.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25744>
This commit is contained in:
Caio Oliveira 2023-10-14 22:37:02 -07:00 committed by Marge Bot
parent 9cccb89dbc
commit 298740d7a1

View file

@ -519,7 +519,7 @@ ra_add_node_adjacency(struct ra_graph *g, unsigned int n1, unsigned int n2)
struct ra_list *adj = &g->nodes[n1].adjacency;
if (adj->size == adj->cap) {
adj->cap = MAX2(16, adj->cap * 2);
adj->cap = MAX2(64, adj->cap * 2);
adj->elems = reralloc(g, adj->elems, unsigned int, adj->cap);
}
adj->elems[adj->size++] = n2;