Skip to content

Commit

Permalink
Merge pull request #422 from robertknight/reduce-excess-graph-allocs
Browse files Browse the repository at this point in the history
Fix excess capacity reservation in `Graph::with_capacity`
  • Loading branch information
robertknight authored Nov 30, 2024
2 parents 35e119e + b226873 commit 1fdba14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -727,9 +727,9 @@ impl Graph {
nodes: Vec::with_capacity(n_nodes),
cached_plan: Mutex::new(None),
source_ids: FxHashMap::default(),
input_ids: Vec::with_capacity(n_nodes),
output_ids: Vec::with_capacity(n_nodes),
captures: Vec::with_capacity(n_nodes),
input_ids: Vec::new(),
output_ids: Vec::new(),
captures: Vec::new(),
node_id_from_name: HashMap::with_capacity(n_nodes),
}
}
Expand Down

0 comments on commit 1fdba14

Please sign in to comment.