From 09706b04fce2afe42cade4cbf1b36db23edde94c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 15 Jul 2023 13:11:04 -0600 Subject: [PATCH] [graph] Add a pre-alloc to map --- src/graph/graph.hh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/graph/graph.hh b/src/graph/graph.hh index 8351fc2a9..9e962cfc5 100644 --- a/src/graph/graph.hh +++ b/src/graph/graph.hh @@ -154,6 +154,7 @@ struct graph_t { hb_hashmap_t result; + result.alloc (obj.real_links.length); for (const auto& l : obj.real_links) { result.set (l.position, l.objidx); }