Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Invalid
-
None
-
None
-
None
Description
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?
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![],
);