From c88b64a86fe50fe9883e5be1cbac3407760fd1f2 Mon Sep 17 00:00:00 2001 From: Xian Date: Wed, 18 Dec 2024 14:02:29 +0100 Subject: [PATCH] Reserve memory for hash_map --- src/subcommand/minimizer_main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/subcommand/minimizer_main.cpp b/src/subcommand/minimizer_main.cpp index e1ec83d920..960c9eddef 100644 --- a/src/subcommand/minimizer_main.cpp +++ b/src/subcommand/minimizer_main.cpp @@ -360,6 +360,7 @@ int main_minimizer(int argc, char** argv) { //Map node id to what gets stored in the payload - either the zipcode or index into oversized_zipcodes hash_map node_id_to_payload; + node_id_to_payload.reserve(gbz->graph.max_node_id() - gbz->graph.min_node_id()); // Build the index. if (progress) {