lyang24 opened a new pull request, #9317: URL: https://github.com/apache/arrow-rs/pull/9317
# Which issue does this PR close?
small optimization
# Rationale for this change
in byte view array, we allocate 4kb on every read call to do utf 8 validation
fn read(&mut self, ...) {
// Allocates 4KB EVERY read() call
let mut utf8_validation_buffer = Vec::with_capacity(4096);
...
}
# What changes are included in this PR?
attach the buffer to struct for resue
```
struct ByteViewArrayDecoderDelta {
utf8_validation_buffer: Vec<u8>, // Stored in struct
}
fn read(&mut self, ...) {
self.utf8_validation_buffer.clear(); // Reuses existing capacity
...
}
```
# Are these changes tested?
existing tests should pass
# Are there any user-facing changes?
no
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
