jhorstmann commented on a change in pull request #9330:
URL: https://github.com/apache/arrow/pull/9330#discussion_r568465456
##########
File path: rust/arrow/src/array/data.rs
##########
@@ -225,11 +226,11 @@ pub struct ArrayData {
/// The buffers for this array data. Note that depending on the array
types, this
/// could hold different kinds of buffers (e.g., value buffer, value
offset buffer)
/// at different positions.
- buffers: Vec<Buffer>,
+ buffers: SmallVec<[Buffer; 1]>,
Review comment:
Good idea! I haven't checked the memory layout of both, but in the
common case of 1 buffer this could inline better (in the absence of LTO). Since
we already have the validity bitmap in a separate Option, the variants are
`Zero`, `One` and `Many`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]