alamb opened a new issue #110:
URL: https://github.com/apache/arrow-rs/issues/110


   *Note*: migrated from original JIRA: 
https://issues.apache.org/jira/browse/ARROW-10274
   
   The arithmetic kernels that don't use SIMD create a `vec` in memory and 
later copy that data into a Buffer. Maybe we could directly write the 
arithmetic result to a mutable buffer and prevent this redundant copy?
   
    
   
    
   {code:java}
       let values = (0..left.len())
                   .map(|i| op(left.value(i), right.value(i))) 
                   .collect::<Vec<T::Native>>();
        
         
               let data = ArrayData::new(
             T::get_data_type(),
                   left.len(),
                   None,
                   null_bit_buffer,
                   0,
                   vec![Buffer::from(values.to_byte_slice())],
                   vec![],
               );{code}
    


-- 
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:
us...@infra.apache.org


Reply via email to