pre-alloc routing table
[dnsseed-rust] / src / bgp_client.rs
index 60c80cf0ad9dbfda7fe172548868e7960f61c333..5f436b1ca106f12d132952436961cd5df0db07a7 100644 (file)
@@ -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),
                }
        }