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

Specialize interleave integer #2898

Merged
merged 1 commit into from Oct 21, 2022

Conversation

tustvold
Copy link
Contributor

@tustvold tustvold commented Oct 20, 2022

Which issue does this PR close?

Part of #2864

Rationale for this change

interleave i32(0.0) 100 [0..100, 100..230, 450..1000]
                        time:   [651.12 ns 653.57 ns 656.31 ns]
                        change: [-63.090% -61.957% -60.766%] (p = 0.00 < 0.05)
                        Performance has improved.

interleave i32(0.0) 400 [0..100, 100..230, 450..1000]
                        time:   [1.4171 µs 1.4235 µs 1.4299 µs]
                        change: [-78.002% -77.910% -77.815%] (p = 0.00 < 0.05)
                        Performance has improved.

interleave i32(0.0) 1024 [0..100, 100..230, 450..1000]
                        time:   [3.0353 µs 3.0481 µs 3.0615 µs]
                        change: [-80.172% -80.078% -79.986%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 16 outliers among 100 measurements (16.00%)
  1 (1.00%) high mild
  15 (15.00%) high severe

interleave i32(0.0) 1024 [0..100, 100..230, 450..1000, 0..1000]
                        time:   [3.0152 µs 3.0182 µs 3.0222 µs]
                        change: [-79.156% -79.115% -79.069%] (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

interleave i32(0.5) 100 [0..100, 100..230, 450..1000]
                        time:   [1.3152 µs 1.3192 µs 1.3238 µs]
                        change: [-69.214% -69.114% -69.015%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 20 outliers among 100 measurements (20.00%)
  1 (1.00%) low mild
  1 (1.00%) high mild
  18 (18.00%) high severe

interleave i32(0.5) 400 [0..100, 100..230, 450..1000]
                        time:   [3.6639 µs 3.6761 µs 3.6898 µs]
                        change: [-76.085% -75.971% -75.851%] (p = 0.00 < 0.05)
                        Performance has improved.

interleave i32(0.5) 1024 [0..100, 100..230, 450..1000]
                        time:   [9.4650 µs 9.4999 µs 9.5384 µs]
                        change: [-76.249% -76.161% -76.071%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 14 outliers among 100 measurements (14.00%)
  1 (1.00%) high mild
  13 (13.00%) high severe

interleave i32(0.5) 1024 [0..100, 100..230, 450..1000, 0..1000]
                        time:   [9.5063 µs 9.5349 µs 9.5671 µs]
                        change: [-76.089% -75.990% -75.895%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 21 outliers among 100 measurements (21.00%)
  2 (2.00%) high mild
  19 (19.00%) high severe

What changes are included in this PR?

Adds a specialized implementation for primitives

Are there any user-facing changes?

No

@github-actions github-actions bot added the arrow Changes to the arrow crate label Oct 20, 2022
@tustvold tustvold force-pushed the specialize-interleave-integer branch from a8c12f0 to 861283c Compare October 20, 2022 23:20
@tustvold tustvold marked this pull request as ready for review October 20, 2022 23:20
Comment on lines +115 to +119
for (a, b) in indices {
let v = cast[*a].is_valid(*b);
null_count += !v as usize;
builder.append(v)
}
Copy link
Member

Choose a reason for hiding this comment

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

Can this loop be combined with above one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried this, but it actually appears to make the performance worse. So leaving as is for now

@tustvold tustvold merged commit 9e5e477 into apache:master Oct 21, 2022
@ursabot
Copy link

ursabot commented Oct 25, 2022

Benchmark runs are scheduled for baseline = f629a2e and contender = 9e5e477. 9e5e477 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

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.

None yet

3 participants