From 418b63c66b91f04bf36ae59d5eecb936c48836ee Mon Sep 17 00:00:00 2001 From: caballa Date: Tue, 22 Oct 2024 22:45:52 -0600 Subject: [PATCH] perf: reserve space for vectors in sgraph --- include/crab/domains/graphs/adapt_sgraph.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/crab/domains/graphs/adapt_sgraph.hpp b/include/crab/domains/graphs/adapt_sgraph.hpp index 4ab2fd9a..7cf60457 100644 --- a/include/crab/domains/graphs/adapt_sgraph.hpp +++ b/include/crab/domains/graphs/adapt_sgraph.hpp @@ -199,6 +199,8 @@ template class AdaptGraph { } void growTo(vert_id v) { + _succs.reserve(v); + _preds.reserve(v); while (size() < v) new_vertex(); }