Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rust] arithmetic without SIMD does unnecesary copy #26269

Closed
asfimport opened this issue Oct 11, 2020 · 2 comments
Closed

[Rust] arithmetic without SIMD does unnecesary copy #26269

asfimport opened this issue Oct 11, 2020 · 2 comments

Comments

@asfimport
Copy link

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![],
            );

 

Reporter: Ritchie / @ritchie46

Note: This issue was originally created as ARROW-10274. Please see the migration documentation for further details.

@asfimport
Copy link
Author

Jorge Leitão / @jorgecarleitao:

Maybe we could directly write the arithmetic result to a mutable buffer and prevent this redundant copy?

Yes :)

@asfimport
Copy link
Author

Andrew Lamb / @alamb:
Migrated to github: apache/arrow-rs#110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant