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

Add ArrayAccessor, Iterator, Extend and benchmarks for RunArray #3603

Merged
merged 6 commits into from
Feb 4, 2023
Merged

Add ArrayAccessor, Iterator, Extend and benchmarks for RunArray #3603

merged 6 commits into from
Feb 4, 2023

Conversation

askoa
Copy link
Contributor

@askoa askoa commented Jan 25, 2023

Which issue does this PR close?

Part of #3520

Rationale for this change

See issue description.

What changes are included in this PR?

  • Implement Extend for the PrimitiveRunBuilder and GenericByteRunBuilder
  • Add TypedRunArray
  • Add RunArrayIter and ArrayAccessor for TypedRunArray
  • Add benchmarks for StringRunBuilder

Are there any user-facing changes?

Users will get new features for RunArray.

No breaking changes.

@github-actions github-actions bot added the arrow Changes to the arrow crate label Jan 25, 2023
@askoa
Copy link
Contributor Author

askoa commented Jan 25, 2023

Benchmark result for string_run_builder

Edit: Updated benchmarks from host with 4 cores.

string_run_builder/(run_array_len:1000, physical_array_len:20, string_len: 5)
                        time:   [6.1440 µs 6.2183 µs 6.3079 µs]
Found 2 outliers among 100 measurements (2.00%)
  1 (1.00%) high mild
  1 (1.00%) high severe
string_run_builder/(run_array_len:1000, physical_array_len:100, string_len: 5)
                        time:   [7.3926 µs 7.4459 µs 7.5066 µs]
Found 3 outliers among 100 measurements (3.00%)
  3 (3.00%) high mild
string_run_builder/(run_array_len:1000, physical_array_len:100, string_len: 10)
                        time:   [7.0743 µs 7.1182 µs 7.1717 µs]
Found 4 outliers among 100 measurements (4.00%)
  2 (2.00%) high mild
  2 (2.00%) high severe
string_run_builder/(run_array_len:10000, physical_array_len:100, string_len: 10)
                        time:   [37.958 µs 38.046 µs 38.145 µs]
Found 9 outliers among 100 measurements (9.00%)
  5 (5.00%) high mild
  4 (4.00%) high severe
string_run_builder/(run_array_len:10000, physical_array_len:100, string_len: 100)
                        time:   [126.84 µs 129.61 µs 133.73 µs]
Found 10 outliers among 100 measurements (10.00%)
  2 (2.00%) high mild
  8 (8.00%) high severe

@askoa
Copy link
Contributor Author

askoa commented Jan 26, 2023

Benchmark result for binary search based ArrayAccessor

The benchmark test definition is in https://github.com/askoa/arrow-rs/blob/run-extra-bench/arrow/benches/primitive_run_accessor.rs

primitive_run_accessor/(run_array_len:1000, physical_array_len:20)
                        time:   [4.3275 µs 4.3478 µs 4.3688 µs]
Found 4 outliers among 100 measurements (4.00%)
  3 (3.00%) high mild
  1 (1.00%) high severe
primitive_run_accessor/(run_array_len:1000, physical_array_len:100)
                        time:   [6.7064 µs 6.7404 µs 6.7796 µs]
Found 11 outliers among 100 measurements (11.00%)
  1 (1.00%) low severe
  3 (3.00%) low mild
  4 (4.00%) high mild
  3 (3.00%) high severe
primitive_run_accessor/(run_array_len:5000, physical_array_len:500)
                        time:   [84.471 µs 84.617 µs 84.775 µs]
Found 4 outliers among 100 measurements (4.00%)
  1 (1.00%) high mild
  3 (3.00%) high severe
primitive_run_accessor/(run_array_len:10000, physical_array_len:1000)
                        time:   [187.83 µs 189.35 µs 191.37 µs]
Found 12 outliers among 100 measurements (12.00%)
  6 (6.00%) high mild
  6 (6.00%) high severe
primitive_run_accessor/(run_array_len:50000, physical_array_len:5000)
                        time:   [876.08 µs 883.37 µs 894.42 µs]
Found 3 outliers among 100 measurements (3.00%)
  2 (2.00%) high mild
  1 (1.00%) high severe


@tustvold
Copy link
Contributor

I intend to review this early next week, apologies for the delay, it is hard for me to find time to review large PRs

Copy link
Contributor

@tustvold tustvold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, just some minor nits. Thank you

arrow-array/src/array/run_array.rs Outdated Show resolved Hide resolved
arrow-array/src/array/run_array.rs Show resolved Hide resolved
arrow-array/src/array/run_array.rs Show resolved Hide resolved
arrow-array/src/array/run_array.rs Outdated Show resolved Hide resolved
arrow-array/src/run_iterator.rs Show resolved Hide resolved
@tustvold tustvold merged commit 25e10dd into apache:master Feb 4, 2023
@tustvold
Copy link
Contributor

tustvold commented Feb 4, 2023

Thank you again

@ursabot
Copy link

ursabot commented Feb 4, 2023

Benchmark runs are scheduled for baseline = 79bda7d and contender = 25e10dd. 25e10dd is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@askoa askoa deleted the run-array-extra branch February 4, 2023 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants