Preallocate vectors

This commit is contained in:
Bojan Serafimov
2023-11-07 00:31:45 -05:00
parent ad5b02e175
commit 69eb02363b

View File

@@ -573,10 +573,10 @@ impl<const L: usize> BuildNode<L> {
BuildNode {
num_children: 0,
level,
prefix: Vec::new(),
prefix: Vec::with_capacity(16),
suffix_len: 0,
keys: Vec::new(),
values: Vec::new(),
keys: Vec::with_capacity(5024),
values: Vec::with_capacity(3140),
size: NODE_HDR_SIZE,
}
}