iceberg-kitten opened a new pull request, #1635:
URL: https://github.com/apache/arrow-go/pull/1635

   ### Why
   A single null sends an integer column through comparison sort.
   
   ### What
   Extend radix sorting to large, single-chunk nullable integer and temporal 
arrays.
   
   ### Implementation
   Stably partition the nulls to the requested end of the output and radix-sort 
the remaining rows. Reuse the partition buffer as radix scratch.
   
   ### Benchmark
   
   Sort 65,536 Int64 rows in one chunk, ascending with nulls at the end.
   
   | Input | Time/op before → after | Change | B/op | Allocs/op |
   | --- | ---: | ---: | ---: | ---: |
   | 1%, random | 27.7 → 3.2 ms | -88.5% | 1,065,392 | 6 |
   | 1%, duplicates | 13.1 → 3.61 ms | -72.5% | 1,065,392 | 6 |
   | 1%, sorted | 2.02 ms → 919 µs | -54.6% | 1,065,392 | 6 |
   | 10%, random | 24.5 → 2.99 ms | -87.8% | 1,065,392 | 6 |
   | 10%, duplicates | 12 → 3.14 ms | -73.8% | 1,065,392 | 6 |
   | 10%, sorted | 1.95 ms → 917 µs | -53.0% | 1,065,392 | 6 |
   | 50%, random | 13.3 → 2.14 ms | -83.9% | 1,065,392 | 6 |
   | 50%, duplicates | 7.26 → 2.15 ms | -70.3% | 1,065,392 | 6 |
   | 50%, sorted | 1.55 ms → 859 µs | -44.5% | 1,065,392 | 6 |
   
   Medians of 8 runs per revision on Linux amd64, Intel Core i9-12900HK, Go 
1.26.11, pinned to one efficiency core. Baseline is `main` at `aba35416`. Use 
the same benchmark on both revisions. Copy the PR's benchmark file into the 
baseline checkout before running.
   
   ```sh
   go test ./arrow/compute/internal/kernels -run '^$' -bench 
'^BenchmarkSortIndices_Int64_Nullable$/^nulls=(1|10|50)%$' -benchmem 
-benchtime=120ms -count=8 -cpu=1
   ```
   


-- 
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]

Reply via email to