Compare commits

...

1 Commits

Author SHA1 Message Date
Bojan Serafimov 69eb02363b Preallocate vectors 2023-11-07 00:31:45 -05:00
+3 -3
View File
@@ -573,10 +573,10 @@ impl<const L: usize> BuildNode<L> {
BuildNode { BuildNode {
num_children: 0, num_children: 0,
level, level,
prefix: Vec::new(), prefix: Vec::with_capacity(16),
suffix_len: 0, suffix_len: 0,
keys: Vec::new(), keys: Vec::with_capacity(5024),
values: Vec::new(), values: Vec::with_capacity(3140),
size: NODE_HDR_SIZE, size: NODE_HDR_SIZE,
} }
} }