tustvold opened a new pull request, #4613: URL: https://github.com/apache/arrow-rs/pull/4613
# 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. --> Part of #4545 # 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. --> Cleans up the sort kernel to make the code easier to maintain. Also changes list sorting to use the same rank-based approach used for dictionaries, which should be substantially faster, although I don't have benchmarks to quantify this. The benchmarks are quite noisy, but this seems to possibly introduce a slight performance improvement. ``` sort i64 2^10 time: [9.1265 µs 9.1303 µs 9.1344 µs] change: [-0.1108% -0.0301% +0.0483%] (p = 0.47 > 0.05) No change in performance detected. Found 4 outliers among 100 measurements (4.00%) 3 (3.00%) high mild 1 (1.00%) high severe sort i64 2^12 time: [30.098 µs 30.180 µs 30.264 µs] change: [+0.0343% +0.3620% +0.6738%] (p = 0.02 < 0.05) Change within noise threshold. Found 10 outliers among 100 measurements (10.00%) 8 (8.00%) high mild 2 (2.00%) high severe sort i64 nulls 2^10 time: [80.763 µs 80.801 µs 80.844 µs] change: [-0.5475% -0.3889% -0.1707%] (p = 0.00 < 0.05) Change within noise threshold. Found 8 outliers among 100 measurements (8.00%) 5 (5.00%) high mild 3 (3.00%) high severe sort i64 nulls 2^12 time: [30.081 µs 30.134 µs 30.195 µs] change: [-3.5573% -2.4943% -1.5011%] (p = 0.00 < 0.05) Performance has improved. Found 10 outliers among 100 measurements (10.00%) 3 (3.00%) high mild 7 (7.00%) high severe sort f32 to indices 2^12 time: [129.59 µs 129.64 µs 129.70 µs] change: [-5.1583% -5.0872% -5.0257%] (p = 0.00 < 0.05) Performance has improved. Found 6 outliers among 100 measurements (6.00%) 3 (3.00%) high mild 3 (3.00%) high severe sort f32 nulls to indices 2^12 time: [93.133 µs 93.219 µs 93.321 µs] change: [-4.6517% -4.5602% -4.4676%] (p = 0.00 < 0.05) Performance has improved. Found 5 outliers among 100 measurements (5.00%) 2 (2.00%) high mild 3 (3.00%) high severe sort string[10] to indices 2^12 time: [371.99 µs 372.25 µs 372.56 µs] change: [+0.3681% +0.4194% +0.4676%] (p = 0.00 < 0.05) Change within noise threshold. Found 4 outliers among 100 measurements (4.00%) 1 (1.00%) high mild 3 (3.00%) high severe sort string[10] nulls to indices 2^12 time: [208.87 µs 208.96 µs 209.05 µs] change: [-3.9053% -3.8462% -3.7828%] (p = 0.00 < 0.05) Performance has improved. Found 8 outliers among 100 measurements (8.00%) 4 (4.00%) high mild 4 (4.00%) high severe sort string[10] dict to indices 2^12 time: [501.59 µs 501.75 µs 501.92 µs] change: [+1.2853% +1.3713% +1.4949%] (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 sort string[10] dict nulls to indices 2^12 time: [271.88 µs 271.96 µs 272.06 µs] change: [-2.3687% -2.3245% -2.2848%] (p = 0.00 < 0.05) Performance has improved. Found 10 outliers among 100 measurements (10.00%) 1 (1.00%) low mild 5 (5.00%) high mild 4 (4.00%) high severe ``` # 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org