projects
/
dnsseed-rust
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e96674
)
pre-alloc routing table
author
Matt Corallo
<git@bluematt.me>
Tue, 21 Jul 2020 17:34:27 +0000
(13:34 -0400)
committer
Matt Corallo
<git@bluematt.me>
Tue, 21 Jul 2020 17:34:27 +0000
(13:34 -0400)
src/bgp_client.rs
patch
|
blob
|
history
diff --git
a/src/bgp_client.rs
b/src/bgp_client.rs
index 60c80cf0ad9dbfda7fe172548868e7960f61c333..5f436b1ca106f12d132952436961cd5df0db07a7 100644
(file)
--- 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
),
}
}