tustvold opened a new pull request, #4818:
URL: https://github.com/apache/arrow-rs/pull/4818
# Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases. You can
link an issue to this PR using the GitHub syntax. For example `Closes #123`
indicates that this PR will close issue #123.
-->
Closes #4812
# Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in
the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your
changes and offer better suggestions for fixes.
-->
Reduces the space amplification for small strings, reducing memory usage and
potentially yielding faster comparisons
```
convert_columns 4096 string(10, 0)
time: [68.766 µs 68.782 µs 68.802 µs]
change: [-0.2111% +0.1136% +0.3981%] (p = 0.56 >
0.05)
No change in performance detected.
Found 10 outliers among 100 measurements (10.00%)
1 (1.00%) low mild
4 (4.00%) high mild
5 (5.00%) high severe
convert_columns_prepared 4096 string(10, 0)
time: [68.588 µs 68.599 µs 68.610 µs]
change: [+0.0308% +0.3071% +0.5887%] (p = 0.00 <
0.05)
Change within noise threshold.
Found 7 outliers among 100 measurements (7.00%)
1 (1.00%) low mild
3 (3.00%) high mild
3 (3.00%) high severe
convert_rows 4096 string(10, 0)
time: [74.786 µs 74.810 µs 74.838 µs]
change: [+18.688% +18.835% +19.078%] (p = 0.00 <
0.05)
Performance has regressed.
Found 8 outliers among 100 measurements (8.00%)
4 (4.00%) high mild
4 (4.00%) high severe
convert_columns 4096 string(30, 0)
time: [73.300 µs 73.469 µs 73.619 µs]
change: [+6.1730% +6.5624% +6.9695%] (p = 0.00 <
0.05)
Performance has regressed.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severe
convert_columns_prepared 4096 string(30, 0)
time: [72.918 µs 73.091 µs 73.262 µs]
change: [+6.5088% +6.8782% +7.2161%] (p = 0.00 <
0.05)
Performance has regressed.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severe
convert_rows 4096 string(30, 0)
time: [87.594 µs 87.620 µs 87.649 µs]
change: [+39.299% +39.758% +40.202%] (p = 0.00 <
0.05)
Performance has regressed.
Found 8 outliers among 100 measurements (8.00%)
3 (3.00%) high mild
5 (5.00%) high severe
convert_columns 4096 string(100, 0)
time: [82.717 µs 82.758 µs 82.802 µs]
change: [-7.4082% -7.2740% -7.0869%] (p = 0.00 <
0.05)
Performance has improved.
Found 5 outliers among 100 measurements (5.00%)
2 (2.00%) low mild
2 (2.00%) high mild
1 (1.00%) high severe
convert_columns_prepared 4096 string(100, 0)
time: [83.181 µs 83.212 µs 83.247 µs]
change: [-5.2730% -5.1499% -4.9101%] (p = 0.00 <
0.05)
Performance has improved.
Found 7 outliers among 100 measurements (7.00%)
1 (1.00%) low mild
4 (4.00%) high mild
2 (2.00%) high severe
convert_rows 4096 string(100, 0)
time: [126.84 µs 126.90 µs 126.97 µs]
change: [+21.245% +21.428% +21.575%] (p = 0.00 <
0.05)
Performance has regressed.
Found 8 outliers among 100 measurements (8.00%)
5 (5.00%) high mild
3 (3.00%) high severe
convert_columns 4096 string(100, 0.5)
time: [95.168 µs 95.188 µs 95.214 µs]
change: [-6.6299% -6.3326% -6.0687%] (p = 0.00 <
0.05)
Performance has improved.
Found 9 outliers among 100 measurements (9.00%)
1 (1.00%) low severe
3 (3.00%) high mild
5 (5.00%) high severe
convert_columns_prepared 4096 string(100, 0.5)
time: [95.093 µs 95.118 µs 95.147 µs]
change: [-6.2227% -6.1799% -6.1403%] (p = 0.00 <
0.05)
Performance has improved.
Found 6 outliers among 100 measurements (6.00%)
2 (2.00%) low mild
4 (4.00%) high mild
convert_rows 4096 string(100, 0.5)
time: [117.71 µs 117.73 µs 117.76 µs]
change: [+4.9569% +5.2699% +5.5499%] (p = 0.00 <
0.05)
Performance has regressed.
Found 7 outliers among 100 measurements (7.00%)
4 (4.00%) high mild
3 (3.00%) high severe
convert_columns 4096 string(20, 0.5), string(30, 0), string(100, 0), i64(0)
time: [293.24 µs 293.40 µs 293.56 µs]
change: [-2.6997% -2.6362% -2.5681%] (p = 0.00 <
0.05)
Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severe
convert_columns_prepared 4096 string(20, 0.5), string(30, 0), string(100,
0), i64(0)
time: [290.93 µs 291.09 µs 291.26 µs]
change: [-3.3535% -3.2713% -3.1558%] (p = 0.00 <
0.05)
Performance has improved.
Found 4 outliers among 100 measurements (4.00%)
1 (1.00%) low mild
2 (2.00%) high mild
1 (1.00%) high severe
convert_rows 4096 string(20, 0.5), string(30, 0), string(100, 0), i64(0)
time: [315.67 µs 315.75 µs 315.84 µs]
change: [+17.810% +17.862% +17.915%] (p = 0.00 <
0.05)
Performance has regressed.
Found 5 outliers among 100 measurements (5.00%)
1 (1.00%) low mild
3 (3.00%) high mild
1 (1.00%) high severe
```
This does noticeably regress the performance of converting rows back into
arrow-arrays, as a result of having to parse additional blocks. I am inclined
to think this isn't a major concern as I have only seen this functionality
being used following expensive, reducing operations like grouping, which will
dominate execution time
# What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it is
sometimes worth providing a summary of the individual changes in this PR.
-->
# Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.
-->
<!---
If there are any breaking changes to public APIs, please add the `breaking
change` label.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]