RyanMarcus commented on PR #6752:
URL: https://github.com/apache/arrow-rs/pull/6752#issuecomment-2484542440

   As you suspected @tustvold , `MutableArrayData` enabled an implementation 
that was much smaller! And should reuse all the existing generics codegen from 
`transform`.
   
   In order to make this efficient, we need a `extend_n` function on 
`MutableArrayData` that copies the same bits many times. Here is a dummy 
(working) implementation:
   
   ```rust
       pub fn extend_n(&mut self, index: usize, start: usize, end: usize, n: 
usize) {
           for _ in 0..n {
               self.extend(index, start, end);
           }
       }
   ```
   I can see that `MutableArrayData` uses some kind of dynamic dispatch magic 
for each call to `extend` which I don't fully understand, but I understand 
enough to know that my current `extend_n` is no good. I'll mark this PR as a 
draft until I figure it out. 


-- 
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]

Reply via email to