You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Jörn Horstmann (Jira)" <ji...@apache.org> on 2020/09/04 16:18:00 UTC
[jira] [Created] (ARROW-9916) [RUST] Avoid cloning ArrayData in
several places
Jörn Horstmann created ARROW-9916:
-------------------------------------
Summary: [RUST] Avoid cloning ArrayData in several places
Key: ARROW-9916
URL: https://issues.apache.org/jira/browse/ARROW-9916
Project: Apache Arrow
Issue Type: Improvement
Components: Rust
Affects Versions: 1.0.0
Reporter: Jörn Horstmann
I noticed this while benchmarking improvements in ARROW-9895. A flamegraph showed a significant amount of time spent in Arc::clone/atomic_add followed by Arc::drop/atomic_sub
The Array trait has two methods for accessing ArrayData, `.data()` which clones an `Arc<ArrayData>` and `.data_ref()` which only borrows the data. In many places borrow can be used instead of clone.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)