From: Matt Corallo Date: Tue, 21 Jul 2020 17:34:27 +0000 (-0400) Subject: pre-alloc routing table X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=dnsseed-rust;a=commitdiff_plain;h=f44ddf483a9e7f8cc136f6ac64de3e135429fd59 pre-alloc routing table --- 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), } }