Skip to content

Conversation

@jorgecarleitao
Copy link
Member

@jorgecarleitao jorgecarleitao commented Jan 2, 2021

This is a corollary of the API PRed in #9076 , and how we can use it to efficiently build Buffer without even using the MutableBuffer. The main idea here is that we can write

    let lengths: Buffer = slice
        .windows(2)
        .map(|offset| offset[1] - offset[0])
        .collect();

and this (efficiently) builds a Buffer from the offset differences.

Bench:

length                  time:   [3.2345 us 3.2457 us 3.2602 us]                    
                        change: [-12.072% -11.361% -10.654%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 10 outliers among 100 measurements (10.00%)
  4 (4.00%) high mild
  6 (6.00%) high severe

@github-actions
Copy link

github-actions bot commented Jan 2, 2021

@codecov-io
Copy link

Codecov Report

Merging #9077 (c1badea) into master (4b7cdcb) will decrease coverage by 0.05%.
The diff coverage is 93.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9077      +/-   ##
==========================================
- Coverage   82.61%   82.56%   -0.06%     
==========================================
  Files         203      204       +1     
  Lines       50140    50091      -49     
==========================================
- Hits        41422    41356      -66     
- Misses       8718     8735      +17     
Impacted Files Coverage Δ
rust/arrow/src/bytes.rs 53.12% <ø> (-5.21%) ⬇️
rust/arrow/src/compute/kernels/aggregate.rs 74.93% <ø> (-0.07%) ⬇️
rust/arrow/src/datatypes.rs 75.02% <ø> (ø)
rust/arrow/src/array/transform/list.rs 86.20% <66.66%> (+2.33%) ⬆️
rust/arrow/src/array/transform/mod.rs 88.29% <83.33%> (ø)
rust/arrow/src/array/builder.rs 85.23% <86.79%> (-0.67%) ⬇️
rust/arrow/src/buffer.rs 95.53% <88.75%> (-2.19%) ⬇️
rust/arrow/src/array/array_binary.rs 90.54% <100.00%> (ø)
rust/arrow/src/array/array_list.rs 92.66% <100.00%> (-0.45%) ⬇️
rust/arrow/src/array/array_primitive.rs 92.28% <100.00%> (-0.04%) ⬇️
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4b7cdcb...c1badea. Read the comment docs.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants