Skip to content

Commit 65c9b89

Browse files
committed
pre-allocate vectors
1 parent c9f66a1 commit 65c9b89

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arrow-ipc/src/reader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl RecordBatchDecoder<'_> {
146146
let null_buffer = self.next_buffer()?;
147147

148148
// read the arrays for each field
149-
let mut struct_arrays = vec![];
149+
let mut struct_arrays = Vec::with_capacity(struct_fields.len());
150150
// TODO investigate whether just knowing the number of buffers could
151151
// still work
152152
for struct_field in struct_fields {

0 commit comments

Comments
 (0)