fallintoplace opened a new pull request, #1360:
URL: https://github.com/apache/arrow-go/pull/1360

   ### What
   - Faster null-free primitive `take` with random and reverse indices.
   
   ### Why
   The sorted path already reads values directly. Other orders call a getter 
for every row.
   
   Bounds-checked `compute.Take`, int64 values and indices. Apple M1 Pro, Go 
1.26.3, GOMAXPROCS=1. Medians from 12 x 200ms interleaved samples per revision. 
Both revisions use the corrected random workload.
   
   | Rows / order | Before | After | Time |
   | --- | ---: | ---: | ---: |
   | 50K / random | 298.2 us | 232.1 us | -22.2% |
   | 50K / reverse | 299.4 us | 211.6 us | -29.3% |
   | 100K / random | 542.8 us | 377.8 us | -30.4% |
   | 100K / reverse | 565.4 us | 399.6 us | -29.3% |
   
   Sorted and nullable controls are similar or faster. Allocation counts are 
unchanged.
   
   ### Implementation
   - Read the flat value slice directly after the existing null checks.
   - Share the existing unrolled copy loop.
   - Keep reverse indices sequential.
   - Fix the random benchmark to use seeded PCG indices.
   


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