Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-9916

[RUST] Avoid cloning ArrayData in several places

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.0
    • 2.0.0
    • Rust

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              jhorstmann Jörn Horstmann
              jhorstmann Jörn Horstmann
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m