We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
DepNode
1 parent 9cd61f0 commit 304a7beCopy full SHA for 304a7be
src/librustc/dep_graph/graph.rs
@@ -992,8 +992,9 @@ impl CurrentDepGraph {
992
993
// Pre-allocate the dep node structures. We over-allocate a little so
994
// that we hopefully don't have to re-allocate during this compilation
995
- // session.
996
- let new_node_count_estimate = (prev_graph_node_count * 115) / 100;
+ // session. The over-allocation is 2% plus a small constant to account
+ // for the fact that in very small crates 2% might not be enough.
997
+ let new_node_count_estimate = (prev_graph_node_count * 102) / 100 + 200;
998
999
CurrentDepGraph {
1000
data: IndexVec::with_capacity(new_node_count_estimate),
0 commit comments