From f44ddf483a9e7f8cc136f6ac64de3e135429fd59 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 21 Jul 2020 13:34:27 -0400 Subject: [PATCH] pre-alloc routing table --- src/bgp_client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bgp_client.rs b/src/bgp_client.rs index 60c80cf..5f436b1 100644 --- a/src/bgp_client.rs +++ b/src/bgp_client.rs @@ -84,8 +84,8 @@ struct RoutingTable { impl RoutingTable { fn new() -> Self { Self { - v4_table: HashMap::new(), - v6_table: HashMap::new(), + v4_table: HashMap::with_capacity(900_000), + v6_table: HashMap::with_capacity(100_000), } } -- 2.39.5