Fokko opened a new issue, #9427:
URL: https://github.com/apache/arrow-rs/issues/9427
**Is your feature request related to a problem or challenge? Please describe
what you are trying to do.**
While going through the code, @scovich noticed that it allocates a
`vec![false; n]` to be appended to the null buffer, which is not very efficent:
```
append_nulls: vec![false; n] (old) vs append_n_nulls (new)
┌─────────┬─────────────────┬──────────────────────┬─────────┐
│ n │ old (vec alloc) │ new (append_n_nulls) │ speedup │
├─────────┼─────────────────┼──────────────────────┼─────────┤
│ 100 │ 82 ns │ 43 ns │ ~2x │
├─────────┼─────────────────┼──────────────────────┼─────────┤
│ 1,000 │ 319 ns │ 47 ns │ ~7x │
├─────────┼─────────────────┼──────────────────────┼─────────┤
│ 10,000 │ 2,540 ns │ 68 ns │ ~37x │
├─────────┼─────────────────┼──────────────────────┼─────────┤
│ 100,000 │ 25,526 ns │ 293 ns │ ~87x │
└─────────┴─────────────────┴──────────────────────┴─────────┘
```
**Describe the solution you'd like**
Don't allocate the buffer, and pass it down to the bitmap.
**Describe alternatives you've considered**
∅
**Additional context**
∅
--
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]