You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Andrew Lamb (Jira)" <ji...@apache.org> on 2021/04/26 12:38:03 UTC

[jira] [Commented] (ARROW-10274) [Rust] arithmetic without SIMD does unnecesary copy

    [ https://issues.apache.org/jira/browse/ARROW-10274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17332135#comment-17332135 ] 

Andrew Lamb commented on ARROW-10274:
-------------------------------------

Migrated to github: https://github.com/apache/arrow-rs/issues/110

> [Rust] arithmetic without SIMD does unnecesary copy
> ---------------------------------------------------
>
>                 Key: ARROW-10274
>                 URL: https://issues.apache.org/jira/browse/ARROW-10274
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Rust
>            Reporter: Ritchie
>            Priority: Minor
>
> 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 message was sent by Atlassian Jira
(v8.3.4#803005)